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: p = []
  p.extend([i**2 for i in range(int(1000 ** (1 / 2)) + 1)])
  p.extend([i**3 for i in range(int(1000 ** (1 / 3)) + 1)])
  p.extend([i**5 for i in range(int(1000 ** (1 / 5)) + 1)])
  p.extend([i**7 for i in range(int(1000 ** (1 / 7)) + 1)])
  p.sort()
  p.append(1001)
  
  N = int(input())
  
  for j in range(len(p) - 1):
      if p[j] <= N < p[j + 1]:
          print(p[j])
  
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"}]