You are given a positive integer X.
Find the largest perfect power that is at most X.
Here, a perfect power is an integer that can be represented as b^p, where b is an integer not less than 1 and p is an integer not less than 2.

-----Constraints-----
 - 1 ≤ X ≤ 1000
 - X is an integer.

-----Input-----
Input is given from Standard Input in the following format:
X

-----Output-----
Print the largest perfect power that is at most X.

-----Sample Input-----
10

-----Sample Output-----
9

There are four perfect powers that are at most 10: 1, 4, 8 and 9.
We should print the largest among them, 9.
[{"code": "x=int(input())\nm=-1000\nif 1<=x<=3:\n  print((1))\n  return\nelse:\n  for b in range(2,x+1):\n   for p in range(2,11):\n    if x>=b**p:\n      m=max(m,b**p)\n   \n\nprint(m)\n\n", "passed": true, "time": 0.15, "memory": 14084.0, "status": "done"}, {"code": "x = int(input())\n\nans = [1]\nfor i in range(2, 1001):\n  p = 2\n  while i**p <= 1000:\n    ans.append(i**p)\n    p += 1\nwhile not x in ans:\n  x -= 1\nprint(x)", "passed": true, "time": 0.24, "memory": 14244.0, "status": "done"}, {"code": "x = int(input())\n# p >= 2, b >= 1\nif x == 1:\n    ans = 1\nelse:\n    ans = 0\n    for i in range(1, x+1):\n        for j in range(2, x+1):\n            e = i**j\n            if e <= x:\n                ans = max(ans, e)\n            else:\n                break\nprint(ans)", "passed": true, "time": 0.21, "memory": 14280.0, "status": "done"}, {"code": "n = int(input())\nt = [1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100,\n     125, 121, 128, 144, 169, 196, 216, 225, 243, 256,\n     289, 324, 343, 361, 400, 441, 484, 512, 529, 576,\n     625, 676, 729, 784, 841, 900, 961, 1000, 1024, 1296]\n\nres = 0\nfor tt in t:\n    res = tt if tt <= n else res\nprint(res)\n", "passed": true, "time": 0.22, "memory": 14192.0, "status": "done"}, {"code": "\nX = int(input())\n\ni = 2\n\nans = 1\nwhile i < X:\n    power = 2\n    while power <= X:\n        if pow(i,power) <= X:\n            ans = max(ans,pow(i,power))\n        else:\n            break\n        power += 1\n    i += 1\nprint(int(ans))", "passed": true, "time": 0.14, "memory": 14244.0, "status": "done"}, {"code": "x = int(input())\nans = 1\nfor i in range(2,int(x ** 0.5) + 1):\n    k = 1\n    temp = 1\n    while temp<=x:\n        ans = max(ans,temp)\n        temp = i ** k\n        k += 1\nprint(ans)", "passed": true, "time": 0.24, "memory": 14188.0, "status": "done"}, {"code": "x = int(input())\nans = 1\ncnt = 1\nfor i in range(1,x):\n    cnt = i\n    for j in range(9):\n        cnt *= i\n        if cnt > x:\n            break\n        if cnt > ans:\n            ans = cnt\nprint(ans)", "passed": true, "time": 0.14, "memory": 14016.0, "status": "done"}, {"code": "n = int(input())\ns = set()\nfor i in range(1, 32):\n    s.add(i ** 2)\n\nfor i in range(1, 11):\n    s.add(i ** 3)\n\nfor i in range(1, 7):\n    s.add(i ** 4)\n\nfor i in range(1, 5):\n    s.add(i ** 5)\n    s.add(i ** 6)\n    s.add(i ** 7)\n    s.add(i ** 8)\n    s.add(i ** 9)\n    s.add(i ** 10)\n\nt = list(s)\nt.sort()\nt = [x for x in t if x <= 1000]\n\nres = 0\nfor tt in t:\n    res = tt if tt <= n else res\nprint(res)", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "X = int(input())\n\nans = 0\nfor i in range(1, int(X**0.5)+1):\n    for j in range(2, 1000):\n        tmp = pow(i, j)\n        if tmp > X:\n            break\n        ans = max(ans, tmp)\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14208.0, "status": "done"}, {"code": "x = int(input())\n\nans = [1]\nfor i in range(2, 1001):\n  p = 2\n  while i**p <= 1000:\n    ans.append(i**p)\n    p += 1\nwhile not x in ans:\n  x -= 1\nprint(x)", "passed": true, "time": 0.15, "memory": 14304.0, "status": "done"}, {"code": "x = int(input())\nprint((max([pow(i, j) for i in range(1, 32)\n           for j in range(2, 10) if pow(i, j) <= x])))\n", "passed": true, "time": 0.23, "memory": 14264.0, "status": "done"}, {"code": "n = int(input())\nans = 1\nfor i in range(1,n):\n    for j in range(2,n):\n        if i ** j <= n:\n            ans = max(ans,i ** j)\n        else:\n            break\nprint(ans)", "passed": true, "time": 0.24, "memory": 14296.0, "status": "done"}, {"code": "x = int(input())\na = 1\nfor i in range(2, x + 1):\n    for j in range(1, x + 1):\n        if j ** i <= x:\n            a = max(a, j ** i)\n        else:\n            break\nprint(a)", "passed": true, "time": 0.15, "memory": 14236.0, "status": "done"}, {"code": "X = int(input())\nn = 1\nif X<=3:\n    print(1)\nelif X==4:\n    print(4)\nelse:\n    n = 4\n    for i in range(2,int(X**0.5)+1):\n        b = i\n        k = 1\n        while b**k<=X:\n            k += 1\n        k -= 1\n        if k>=2:\n            n = max(n,b**k)\n    print(n)", "passed": true, "time": 0.15, "memory": 14192.0, "status": "done"}, {"code": "x = int(input())\nc=1\nfor b in range(1,x):\n    for p in range(2,x):\n        if b**p<=x:c=max(c,b**p)\n        else:break\nprint(c)", "passed": true, "time": 0.15, "memory": 14260.0, "status": "done"}, {"code": "b=[0]*1001\nx=int(input())\nb[1]=1\nfor i in range(2,1000,1):\n    j=i*i\n    while j<1001:\n        b[j]=1\n        j*=i\nfor i in range(x,0,-1):\n    if b[i]==1:\n        print(i)\n        break", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "def solve(X):\n    ans = 1\n\n    for i in range(1, 32):\n        for j in range(2, 11):\n            tmp = i ** j\n            if tmp <= X and ans < tmp:\n                ans = tmp\n\n    return ans\n\n\ndef __starting_point():\n    X = int(input())\n    print((solve(X)))\n\n__starting_point()", "passed": true, "time": 0.15, "memory": 14280.0, "status": "done"}, {"code": "def answer(x: int) -> int:\n    if x < 4 :\n        return 1\n\n    result = 1\n    for b in range(2, x + 1):\n        for p in range(2, x + 1):\n            exp = pow(b, p)\n            if exp <= x:\n                result = max(result, exp)\n            else:\n                break\n\n    return result\n\n\ndef main():\n    x = int(input())\n    print((answer(x)))\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "X = int(input())\nS = set([1])\nfor i in range(2,X):\n  b = 2\n  while(i**b<=X):\n    S.add(i**b)\n    b += 1\n\nans = max(S)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "x = int(input())\nexpotential = [0] * (x + 1)\nexpotential[1] = 1\nfor b in range(2, x+1):\n\tt = b * b\n\twhile(t <= x):\n\t\texpotential[t] = 1\n\t\tt *= b\nfor i in range(x, 0, -1):\n\tif expotential[i]:\n\t\tprint(i)\n\t\tbreak", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "x = int(input())\nans = 1\nfor i in range(1,x+1):\n  for j in range(2,11):\n    if i**j <= x:\n      ans = max(ans,i**j)\n    else:\n      break\nprint(ans)", "passed": true, "time": 0.22, "memory": 14096.0, "status": "done"}, {"code": "X = int(input())\nans = 1\nfor i in range(2, 32):\n    for j in range(2, 10):\n        if i ** j > X:\n            continue\n        ans = max(ans, i ** j)\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "import sys, math\nlines = [s.rstrip(\"\\n\") for s in sys.stdin.readlines()]\nx, = [int(num) for num in lines.pop(0).split(\" \")]\nmax_base = int(math.sqrt(x))\nmax = 1\nfor base in range(2, max_base + 1):\n    i = 2\n    while True:\n        tmp_max = base ** i\n        if tmp_max <= x:\n            if tmp_max > max:\n                max = tmp_max\n            i += 1\n        else:\n            break\nprint(max)\n", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "x = int(input())\nans = 1\nfor b in range(2,int(x**0.5)+1):\n  for p in range(2,10):\n    c = b**p\n    if c > x:\n      break\n    ans = max(ans,c)\nprint(ans)", "passed": true, "time": 0.15, "memory": 14328.0, "status": "done"}, {"code": "x = int(input())\nans = 0\nfor i in range(x):\n    for j in range(2,10): \n        if i**j <= x:\n            ans = max(ans,i**j)\n            #print(ans,i,j)\n        else:\n            break\n\nif ans == 0:\n    ans = 1\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14028.0, "status": "done"}, {"code": "x = int(input())\ntmp = 1\nfor b in range(1, x):\n    for p in range(2,x):\n        if b**p <= x:\n            tmp = max(tmp, b**p)\n        else:\n            break\nprint(tmp)\n\n", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "X = int(input())\nres_list = [1]\n\nfor i in range(1,X):\n    for j in range(2,X):\n        if i ** j <= X:\n            res_list.append(i ** j)\n        else:\n            break\n\nprint(max(res_list))", "passed": true, "time": 0.14, "memory": 14028.0, "status": "done"}, {"code": "x=int(input())\nans = 0\nfor i in range(1,32):\n  for j in range(2,11):\n    if i**j <= x:\n      ans = max(ans,i**j)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "x = int(input())\npr = [1]\nfor i in range(2,32):\n    for j in range(2,10):\n        if (i**j <= 1000)&(i**j not in pr):\n            pr.append(i**j)\nprint(max([k for k in pr if k <= x]))", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "X = int(input())\nlst = [1]\nfor i in range(2, 32):\n    for j in range(2, 10):\n        x = i ** j\n        if x <= 1000:\n            lst.append(x)\nif X in lst:\n    print(X)\nelse:\n    lst.append(X)\n    lst2 = sorted(lst)\n    n = lst2.index(X)\n    print(lst2[n-1])", "passed": true, "time": 0.14, "memory": 14316.0, "status": "done"}, {"code": "x = int(input())\n\nans = 0\nif x <=2:\n    ans = x\nelse:\n    for i in range(1, x+1):\n        for j in range(2, x+1):\n            if i**j <= x:\n                ans = max(ans, i**j)\n            elif i**j > x:\n                break\n\nprint(ans)\n", "passed": true, "time": 0.15, "memory": 14300.0, "status": "done"}, {"code": "x = int(input())\nif x == 1000:\n    print(1000)\n    return\nlist_exp = []\nmax_b = int(1000 ** 0.5)\nmax_p = 0\nwhile True:\n    if 2 ** max_p > 1000:\n        break\n    else: max_p += 1\n\nfor b in range(1, max_b + 1):\n    for p in range(2, max_p):\n        if b ** p <= 1000: list_exp.append(b ** p)\n        else: break\nlist_exp.sort()\nfor i in range(0, len(list_exp)):\n    if list_exp[i] <= x: continue\n    else:\n        print(list_exp[i - 1])\n        break", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "            \nX=int(input())\n\nif X==1:\n    print((1))\n    return\n\ndef prime_factorize(n):\n    a = []\n    while n % 2 == 0:\n        a.append(2)\n        n //= 2\n    f = 3\n    while f * f <= n:\n        if n % f == 0:\n            a.append(f)\n            n //= f\n        else:\n            f += 2\n    if n != 1:\n        a.append(n)\n    return a\n\nwhile True:\n    a=prime_factorize(X)\n    temp=[]\n    c=1\n    sw=True\n    if len(a)==1:\n        sw=False\n    for i in range(len(a)-1):\n        if a[i]!=a[i+1]:\n            temp.append(c)\n            c=0\n        c+=1\n    temp.append(c)\n\n    for j in range(len(temp)-1):\n        if temp[j]!=temp[j+1] or temp[j]==1:\n            sw=False\n    if sw==True:    \n        print(X)\n        return\n    X-=1\n", "passed": true, "time": 0.23, "memory": 14048.0, "status": "done"}, {"code": "X=int(input())\nans=1\nfor i in range(2,int(X**0.5)+1):\n    x=i\n    while x<=X:\n        ans=max(ans,x)\n        x*=i\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "X = int(input())\nexps = []\nfor b in range(1,34):\n  for p in range(2,11):\n    x = b**p\n    if x < 1001:\n      exps.append(x)\nexps = list(set(exps))\nexps.sort()\nfor a in exps[::-1]:\n  if X >= a:\n    print(a)\n    break", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "X = int(input())\n\nans = 1\nfor i in range(2, X+1):\n  t = i*i\n  while t <= X:\n    ans = max(ans, t)\n    t *= i\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "import bisect\nx = int(input())\na = 2\nb = 2\nk = {1}\n\nwhile a <= 31:\n\twhile pow(a, b) <= 1000:\n\t\tk.add(pow(a, b))\n\t\tb += 1\n\tb = 2\n\ta += 1\n\nkl = list(k)\nkl.sort()\nprint(kl[bisect.bisect_right(kl, x)-1])", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "N = int(input())\nans = 0\nfor i in range(1, N + 1):\n    for j in range(2, 20):\n        if i ** j > N:\n            continue\n        ans = max(i ** j, ans)\nprint(ans)\n", "passed": true, "time": 0.24, "memory": 14084.0, "status": "done"}, {"code": "X = int(input())\n\nans = 0\nfor i in range(1, int(X**0.5)+1):\n    for j in range(2, 1000):\n        tmp = pow(i, j)\n        if tmp > X:\n            break\n        ans = max(ans, tmp)\n\nprint(ans)", "passed": true, "time": 0.15, "memory": 14212.0, "status": "done"}, {"code": "x = int(input())\nli = []\nfor i in range(1,100):\n    for j in range(2,12):\n        if i ** j <= x:\n            if i**j not in li:\n                li.append(i**j)\nprint(max(li))", "passed": true, "time": 0.24, "memory": 14304.0, "status": "done"}, {"code": "def main():\n    X = int(input())\n    ans = 1\n    for i in range(2, X+1):\n        for j in range(2, 11):\n            if i**j > X:\n                break\n            else:\n                ans = max(ans, i**j)\n    print(ans)\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "#-*-coding:utf-8-*-\nimport sys\ninput=sys.stdin.readline\n\ndef main():\n    n = int(input())\n    answers=[]\n\n    if n<=3:\n        print(n)\n        return\n\n    for b in range(2,n):\n        #b**2\u304b\u3089b**10\u307e\u3067\u8abf\u3079\u308b\n        for p in range(2,11):\n            if b**p > n:\n                break\n            elif b**p <=n:\n                answers.append(b**p)\n            else:\n                continue\n    print(max(answers))\n                \n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.23, "memory": 14188.0, "status": "done"}, {"code": "x = int(input())\nans = 1\nfor i in range(1,x):\n    for j in range(2,x):\n        if i**j <= x :\n            ans = max(ans,i**j)\n        else : break\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "x=int(input())\nc=1\nfor b in range(1,x):\n    for p in range(2,x):\n        if b**p<=x:\n            c=max(c,b**p)\n        else:\n            break\nprint(c)", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "import math\nX = int(input())\nbeki = []\nbeki.append(1)\nXruto = math.sqrt(X)\nXruto = math.floor(Xruto)\nfor i in range(2, Xruto+1):\n    for j in range(10):\n        a = pow(i, j)\n        if a <= X:\n            beki.append(a)\n        else:\n            break\nprint((max(beki)))\n", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "a = int(input())\nans = 0\ni = 1\nwhile i*i <= a:\n  for j in range(1, 1000):\n    if i**j <= a and ans < i**j:\n      ans = i**j\n    if i**j > a:\n      break;\n  i += 1\nprint(ans)", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "x=int(input())\nres=0\nfor b in range(x+1):\n    for p in range(2,x+2):\n        if res<(b**p)<=x:\n            res=b**p\n        elif b**p>x:\n            break\nprint(res)\n\n", "passed": true, "time": 0.15, "memory": 14292.0, "status": "done"}, {"code": "import math\nX = int(input())\nans = 1\nY = math.floor(math.sqrt(X))\nfor i in range(2, Y+1):\n    for j in range(2, 10):\n        a = i**j\n        if a <= X:\n            ans = max(ans, a)\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "import re\nimport sys\nimport math\nimport itertools\nimport bisect\nfrom copy import copy\nfrom collections import deque,Counter\nfrom decimal import Decimal\nimport functools\ndef v(): return input()\ndef k(): return int(input())\ndef S(): return input().split()\ndef I(): return map(int,input().split())\ndef X(): return list(input())\ndef L(): return list(input().split())\ndef l(): return list(map(int,input().split()))\ndef lcm(a,b): return a*b//math.gcd(a,b)\nsys.setrecursionlimit(10 ** 6)\nmod = 10**9+7\ncnt = 0\nans = 0\nnum = []\ninf = float(\"inf\")\nal = \"abcdefghijklmnopqrstuvwxyz\"\nAL = al.upper()\n\nN = k()\nif N == 1:\n    print(1)\n    return\n \nfor i in range(N,-1,-1):\n    for j in range(1,int(N**0.5)+1):\n        for k in range(2,11):\n            if j**k == i:\n                print(i)\n                return", "passed": true, "time": 0.16, "memory": 14328.0, "status": "done"}, {"code": "x = int(input())\n\ntable = [False] * -~x\ntable[1] = True\nfor i in range(2, 32):\n    j = i * i\n    while j <= x:\n        table[j] = True\n        j *= i\n\nprint((max(i for i in range(x + 1) if table[i])))\n", "passed": true, "time": 0.14, "memory": 14220.0, "status": "done"}, {"code": "import math\nX=int(input())\n\ndef check_p(X,b):\n\tp = 0\n\twhile b**(p+1) <= X:\n\t\tp+=1\n\treturn b**p\n\nans=1\nfor b in range(2,int(math.sqrt(X))+1):\n\tans = max(ans,check_p(X,b))\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14264.0, "status": "done"}, {"code": "x = int(input())\nans = 1\nfor i in range(x):\n    for j in range(2,10): \n        if i**j <= x:\n            ans = max(ans,i**j)\n            #print(ans,i,j)\n        else:\n            break\n\nprint(ans)", "passed": true, "time": 0.15, "memory": 14112.0, "status": "done"}, {"code": "#!/usr/bin/env python3\n\ndef main():\n    x = int(input())\n    ans = 0\n    for b in range(1, 1000):\n        for p in range(2, 10):\n            if x >= b ** p:\n                ans = max(ans, b ** p)\n    print(ans)\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.15, "memory": 14344.0, "status": "done"}, {"code": "X = int(input())\nans = 1\nfor i in range(2, X + 1):\n    for j in range(2, X + 1):\n        a = i ** j\n        if a > X:\n            break\n        elif a > ans:\n            ans = a\nprint(ans)", "passed": true, "time": 0.14, "memory": 14240.0, "status": "done"}, {"code": "x=int(input())\nc=1\nfor b in range(1,32):\n    for p in range(2,10):\n        if b**p<=x:\n          c=max(c,b**p)\n        else:break\nprint(c)", "passed": true, "time": 0.15, "memory": 14296.0, "status": "done"}, {"code": "x = int(input())\nans = 0\nfor i in range(1,32):\n    for j in range(2,10):\n        if i**j <= x:\n            ans = max(ans,i**j)\nprint(ans)", "passed": true, "time": 0.16, "memory": 14112.0, "status": "done"}, {"code": "x = int(input())\nex = [0 for i in range(1001)]\nex[1] = 1\n\nfor i in range(2, 1001):\n  tmp = i * i\n  while tmp <= 1000:\n    ex[tmp] = 1\n    tmp *= i\n  \nfor i in range(x, 0, -1):\n  if ex[i] == 1:\n    print(i)\n    break\n", "passed": true, "time": 0.15, "memory": 14088.0, "status": "done"}, {"code": "a = int(input())\nprint(max(j ** i for j in range(32) for i in range(2, 10) if j ** i <= a))", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "n=int(input())\nans=1\nfor b in range(2,100):\n    tmp=b\n    for p in range(2,10):\n        tmp*=b\n        if tmp<=n :\n            ans=max(ans,tmp)\nprint(ans)", "passed": true, "time": 0.33, "memory": 14220.0, "status": "done"}, {"code": "n = int(input())\nprint(max([pow(i, j) for i in range(1, 32)\n           for j in range(2, 10) if pow(i, j) <= n]))", "passed": true, "time": 0.15, "memory": 14260.0, "status": "done"}, {"code": "x = int(input())\n\nans = 1\nfor i in range(2, int(x**(1/2)//1+1)):\n    v = 1\n    while v*i <= x:\n        v *= i\n    ans = max(ans, v)\nprint(ans)", "passed": true, "time": 0.15, "memory": 14176.0, "status": "done"}, {"code": "from bisect import bisect_right\n\n\ncands = []\nfor i in range(2, 400):\n    cur = i\n    while cur * i <= 1000:\n        cands.append(cur * i)\n        cur *= i\ncands.sort()\n\nX = int(input())\nif X == 1:\n    print((1))\nelse:\n    print((cands[bisect_right(cands, X) - 1]))\n", "passed": true, "time": 0.14, "memory": 14220.0, "status": "done"}, {"code": "x=int(input())\nans = 0\nfor i in range(2,11):\n    for j in range(1,x+1):\n        if x>=j**i:\n            ans = max(ans,j**i)\nprint(ans)", "passed": true, "time": 0.27, "memory": 14088.0, "status": "done"}, {"code": "x = int(input())\nmax_val = 1\nfor i in range(1, x):\n    for j in range(2, x):   \n        val = i ** j\n        if val > x:\n            break\n        elif val > max_val:\n            max_val = val\nprint(max_val)", "passed": true, "time": 0.14, "memory": 14160.0, "status": "done"}, {"code": "X = int(input())\n\nmaxi = 0\n\nif X < 4:\n    print(1)\n    return\n\nfor i in range(1, X+1):\n    for j in range(2, X+1):\n        if i**j <= X and i**j >= maxi:\n            maxi = i**j\n        if i**j > X:\n            break\n\nprint(maxi)", "passed": true, "time": 0.2, "memory": 14116.0, "status": "done"}, {"code": "x = int(input())\n\nans = 0\nfor i in range(1, 100):\n    for j in range(2, 100):\n        y = pow(i, j)\n        if y <= x:\n            ans = max(ans, y)\n\nprint(ans)\n", "passed": true, "time": 0.16, "memory": 14212.0, "status": "done"}, {"code": "X=int(input())\nans=0\nfor i in range(X+1):\n    if i*i<=X:\n        sum=i*i\n        for j in range(X):\n            if i**j>X:\n                break\n            sum=max(sum,i**j)\n    else:\n        break\n    ans=max(ans,sum)\n\nprint(ans)", "passed": true, "time": 0.23, "memory": 14244.0, "status": "done"}, {"code": "X = int(input())\ncnt = 1\nfor b in range(1,X):\n    for p in range(2,X):\n        if b**p <= X:\n          cnt = max(cnt, b**p)\n        else: break\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "x = int(input())\nans = 0\nfor i in range(1, 100):\n    for j in range(2, 10):\n        a = i**j\n        if a <= x and x-a <= x-ans:\n            ans = a\nprint(ans)", "passed": true, "time": 0.15, "memory": 14104.0, "status": "done"}, {"code": "X = int(input())\nans = []\nfor i in range(1,X+1):\n  A = 0\n  p = 2\n  if i == 1:\n    ans.append(1)\n  else:\n    while True:\n      A = i**p\n      if A <= X:\n        ans.append(A)\n        p += 1\n      else:\n        break\nprint(max(ans))", "passed": true, "time": 0.15, "memory": 14260.0, "status": "done"}, {"code": "X = int(input())\n\ni = 2\n\nans = 1\nwhile i < X:\n    power = 2\n    while i**power <= X:\n        ans = max(ans,i**power)\n        power += 1\n    i += 1\nprint(int(ans))", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "n = int(input())\nimport math as m\nif n < 4:\n  print((1))\n  return\n  \nperfect = 1\nfor b in range(2,int(n**0.5)+1):\n  p = int(m.log(n,b))\n  x = b**(p+1)\n  if x > n:\n    x = b**p\n  perfect = max(perfect,x)\n  #print(b,x)\n  if perfect == n:\n    break\n\nprint(perfect)\n", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "ans = []\nX = int(input())\nfor i in range(1,50):\n  for j in range(2,20):\n    if (i ** j)<= X:\n      ans.append(i**j)\nprint(max(ans))", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "X = int(input())\n\nmax_expo = 1\n\nfor p in range(2,10):\n  for b in range(X):\n    if max_expo < (b**p) <= X:\n      max_expo = (b**p)\nprint(max_expo)", "passed": true, "time": 0.14, "memory": 14340.0, "status": "done"}, {"code": "import bisect\na = int(input())\nb = [1]\nfor i in range(2,34):\n  j = 2\n  while i**j <= 1000:\n    b.append(i**j)\n    j += 1\nc = sorted(b)\nindex = bisect.bisect_right(c,a)\nprint((c[index-1]))\n\n", "passed": true, "time": 0.23, "memory": 14084.0, "status": "done"}, {"code": "import sys\n \nX = int(sys.stdin.readline())\nans = 0\nfor i in range(X+1):\n    for j in range(2, 11):\n        tmp = pow(i, j)\n        if tmp <= X:\n            ans = max(ans, tmp)\nprint(ans)", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "n = int(input())\na = {1}\nfor b in range(2,n):\n  p = 2\n  x = b**p\n  while x <= n:\n    a.add(x)\n    x = b**p\n    p += 1\n\nprint(max(a))", "passed": true, "time": 0.14, "memory": 14040.0, "status": "done"}, {"code": "X = int(input())\nb = 2\np = 2\nans = 1\nfor b in range(1, X+1):\n    for p in range(2, X+1):\n        beki = b ** p\n        if beki <= X:\n            ans = max(ans, beki)\n        else:\n            break\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "x=int(input())\nans=0\nif x==1:\n  print(1)\n  return\nfor i in range(1,x):\n  for j in range(2,10):\n    if i**j<=x:\n      ans=max(ans,i**j)\n    else:\n      break\nprint(ans)", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "import math\nX = int(input())\n\nls = []\nfor i in range(2,math.floor(math.sqrt(X))+1):\n  for j in range(2,10):\n    if i ** j <= X:\n      ls.append(i ** j)\n      \nprint(max(ls) if ls else 1)", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "X = int(input())\nans = []\nans.append(1)\nfor i in range(2, X):\n    a = i*i\n    while a <= X:\n        ans.append(a)\n        a *= i\nprint((max(ans)))\n", "passed": true, "time": 0.14, "memory": 14204.0, "status": "done"}, {"code": "x = int(input())\nans = 1\nfor p in range(2, x+1):\n    for b in range(1, x+1):\n        if b**p <= x:\n            ans = max(ans, b**p)\n        else:\n            break\nprint(ans)", "passed": true, "time": 0.23, "memory": 14328.0, "status": "done"}, {"code": "import math\ndef resolve():\n    x = int(input())\n    sqrt_x = int(math.sqrt(x))\n    al = list()\n    for i in range(2, 10):\n        for j in range(sqrt_x, 0, -1):\n            if j**i <= x:\n                al.append(j**i)\n                break\n    al = sorted(al)\n    print(al[-1])\nresolve()", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "X=int(input())\nans=0\nfor i in range(1,32):\n    for j in range(2,10):\n        tmp=i**j\n        if ans<tmp<=X:\n            ans=tmp\nprint(ans)", "passed": true, "time": 0.14, "memory": 14228.0, "status": "done"}, {"code": "x = int(input())\nans = 1000000\nfor b in range(1,32):\n    for p in range(2,10):\n        if x-b**p < 0:\n            continue\n        ans = min(ans,abs(x-(b**p)))\nprint((x-ans))\n", "passed": true, "time": 0.2, "memory": 14268.0, "status": "done"}, {"code": "x = int(input())\nmx = 0\nfor b in range(1, int(1000 ** 0.5) + 1):\n    for p in range(2, 10):\n        if mx < b ** p <= x:\n            mx = b ** p\nprint(mx)", "passed": true, "time": 0.14, "memory": 14416.0, "status": "done"}, {"code": "X = int(input())\nans = [1]\nfor i in range(2,X+1):\n  p = 2\n  while i**p <= X:\n    ans.append(i**p)\n    p += 1\nprint(max(ans))", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "x = int(input())\n\nans = 1\nfor i in range(2, x):\n    if i * i > x:\n        break\n\n    now = i\n    while now * i <= x:\n        now *= i\n    if now > ans:\n        ans = now\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14036.0, "status": "done"}, {"code": "a=int(input())\nd=0\ne=0\nfor i in range(40):\n  b=i+2\n  while b<=a:\n    b=b*(i+2)\n    e=e+1\n  c=b/(i+2)\n  if e>1:\n    if d<=c:\n      d=c\n      e=0\n  else:\n    e=0\nif d==0:\n  print(1)\nelse:\n  print(int(d))", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "import math\nx = int(input())\n\nres = 1\nfor b in range(2, math.ceil(math.sqrt(x))):\n    p = 2\n    while b**(p+1) <= x:\n        p += 1\n    res = max(res, b ** p)\nprint(res)", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "X = int(input())\n\ni = 2\nans = 1\nwhile i < X:\n    power = 2\n    while pow(i,power) <= X:\n        ans = max(ans,pow(i,power))\n        power += 1\n    i += 1\nprint(int(ans))", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "x = int(input())\nans = 0\nfor i in range(x+1):\n    for j in range(2,10):\n        if i**j <=x:\n            ans = max(ans,i**j)\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "import math\nX = int(input())\nlist1 = []\n\nfor i in range(2,X+1):\n  for j in range(2,int((X + 1)/2)):\n    a = math.log10(i)/math.log10(j)\n    if a.is_integer():\n      list1.append(i)\nif list1 == []:\n  print((1))\nelse:\n  print((max(list1)))\n", "passed": true, "time": 0.24, "memory": 14256.0, "status": "done"}, {"code": "import sys\nn=int(input())\n\nans=[]\n\nif n==1:\n    print('1')\n    return\n\nfor i in range(n//2):\n    for j in range(n//2):\n        if i**j<=n:\n            ans.append(i**j)\n\nprint(max(ans))", "passed": true, "time": 0.62, "memory": 14240.0, "status": "done"}]