output_description: Print the largest perfect power that is at most X.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      X
attempt: x = int(input())
  if x <= 3:
    print(1):
  else:
    a = []
    for i in range(2, x + 1):
      j = 2
      while i ** j < x:
        a.append(i ** j)
    print(max(a))
problem_description: Statement
  
  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.
samples: [{"input": "10", "output": "9\n    \n\nThere are four perfect powers that are at most 10: 1, 4, 8 and 9. We should\nprint the largest among them, 9.\n\n* * *"}, {"input": "1", "output": "1\n    \n\n* * *"}, {"input": "999", "output": "961"}]