Duff is in love with lovely numbers! A positive integer x is called lovely if and only if there is no such positive integer a > 1 such that a^2 is a divisor of x. [Image] 

Malek has a number store! In his store, he has only divisors of positive integer n (and he has all of them). As a birthday present, Malek wants to give her a lovely number from his store. He wants this number to be as big as possible.

Malek always had issues in math, so he asked for your help. Please tell him what is the biggest lovely number in his store.


-----Input-----

The first and only line of input contains one integer, n (1 ≤ n ≤ 10^12).


-----Output-----

Print the answer in one line.


-----Examples-----
Input
10

Output
10

Input
12

Output
6



-----Note-----

In first sample case, there are numbers 1, 2, 5 and 10 in the shop. 10 isn't divisible by any perfect square, so 10 is lovely.

In second sample case, there are numbers 1, 2, 3, 4, 6 and 12 in the shop. 12 is divisible by 4 = 2^2, so 12 is not lovely, while 6 is indeed lovely.

Difficulty: interview

Starter code:

Solutions:
n = int(input())
ans = 1
i = 2
while i * i <= n:
    if n % i == 0:
        ans *= i
    while n % i == 0:
        n //= i
    i += 1
ans *= n
print(ans)

from math import ceil
n = int(input())
n1 = n
p = 1
mas = set()
for i in range(2, ceil(n**.5) + 1):
    cnt = 0
    while n % i == 0:
        n = n//i
        mas.add(i)
        p *= i
mas.add(n1 // p)
p = 1
for i in mas:
    p *= i
print(p)


n = int(input())
divs = set()
div = 2
while div <= n ** 0.5:
    if n % div == 0:
        divs.add(div)
        n //= div
    else:
        div += 1
if n > 1:
    divs.add(n)
ans = 1
for div in divs:
    ans *= div
print(ans)

n=int(input())
s=set()
for i in range(2,int(n**0.5)+1):
    while n%i==0: s|={i}; n//=i
s|={n}
d=1
for x in s: d*=x
print(d)

def factorize(n):
    result = { }
    i = 2
    while i * i <= n:
        d, m = divmod(n, i)
        if m == 0:
            count = 0
            while m == 0:
                count += 1
                n = d
                d, m = divmod(n, i)
            result[i] = count
        i += 1
    result[n] = 1
    return result

n = int(input())
result = 1
for k, v in list(factorize(n).items()):
    result *= k
print(result)


n = int(input())

for_ans = set()
i = 2

while i <= n ** 0.5:
    if n % i == 0:
        for_ans.add(i)
        n //= i
    else:
        i += 1

ans = 1
for_ans.add(n)

for e in for_ans:
    ans *= e

print(ans)

def fct(n):
    r = []
    for i in range(1,int(n**.5)+1):
        if n%i == 0:
            r.append(i)
            r.append(int(n/i))
    return r

def lov(n):
    i = 2
    f = 0
    while i**2<=n:
        if n%i**2 == 0:
            
            f = 1
            break
        i += 1
    return f

n = int(input())

a = fct(n)
a = sorted(a,reverse=True)
res = 0
for i in a:
    if lov(i) == 0:
        res = i
        break
        
print (res)


from itertools import accumulate,chain,cycle
n=int(input())
def prime_powers_iter(n):
    for c in accumulate(chain([2, 1, 2], cycle([2,4]))):
        if c*c > n: break
        if n%c: continue
        d,p = (), c
        while not n%c:
            n,p,d = n//c, p*c, d + (p,)
        yield(d)
    if n > 1: yield((n,))
def prime_powers(n):
    return list(i[0] for i in list(prime_powers_iter(n)))
mul=1
for i in prime_powers(n):
    mul*=i
print(mul)


ans = 1
flag = False
n = int(input())
while n%2==0:
    if flag == False:
        flag = True
        ans*=2
    n = n//2
flag = False
i = 3
while i*i <= n:
    while n%i==0:
        if flag == False:
            flag = True
            ans*=i
        n=n//i
    flag = False
    i+=2
if n>2:
    ans*=n
print(ans)

def factor(n):
    ans = set()
    q = 2
    while q * q <= n:
        if n % q == 0:
            ans.add(q)
            n //= q
        else:
            q += 1
    if n > 1:
        ans.add(n)
    return ans
n = int(input())
num = 1
q_n_set = factor(n)
for i in q_n_set:
    num *= i
print(num)


import math
n = int(input())
res = 1
for i in range(2, round(math.sqrt(n)) + 1):
    if n % i == 0:
        res *= i
        while n % i == 0:
            n = n // i
if n != 0:
    res *= n
print(res)




import sys


#sys.stdin = open("input.txt")
#sys.stdout = open("output.txt", "w")

n = int(input())

di = [1]
i = 2
while n > 1:
	if i*i > n:
		break
	if n % i == 0:
		di += [i]
		while n % i == 0 and n > 1:
			n //= i
	i += 1

if n != 1:
	di += [n]

ans = 1
for item in di:
	ans *= item
print(ans)

def Factor(n):
    Ans = 1
    d = 2
    used = []
    while d * d <= n:
        if n % d == 0:
            if d not in used:
                Ans *= d
                used.append(d)
            n //= d
        else:
            d += 1
    if n > 1:
        if n not in used:
            Ans *= n
    return Ans

print(Factor(int(input())))


from math import sqrt

f = {}
def factor(n):
    if n in f:
        return f[n]
    
    factors = set()
    for x in range(1, int(sqrt(n)) + 1):
        if n % x == 0:
            factors.add(x)
            factors.add(n//x)

    factors = sorted(factors, reverse = True)
    f[n] = factors
            
    return factors
  
n = int(input())

for i in factor(n):
    is_success = True
    for j in factor(i):
        if j > 1:
            s = sqrt(j)
            if s == int(s):
                is_success = False
                break
    if is_success:
        print(i)
        return


def __starting_point():
    n = int(input())
    total = 1
    for i in range(2, int(pow(n, 0.5)) + 2):
        if n % i == 0:
            total *= i

        while n % i == 0:
            n //= i

    print(total * n)

__starting_point()

from math import sqrt
from sys import stdin

a = set()

n = int(stdin.readline())

n2 = sqrt(n)
t = 2;
while t <= n2 and n > 1:
    if n % t == 0:
        n //= t
        a.add(t)
        t = 1
        n2 = sqrt(n)
    t += 1

a.add(n)
q = 1
for x in a:
    q *= x

print(q)

        
n = int(input())

for i in range(2, min(1000001, n) ) :
    while n % (i*i) == 0 :
        n //= i

print(n)


n = int(input())

sol = 1
i = 2

while i*i <= n:
    if n % i == 0:
        sol *= i
    while n % i == 0:
        n //= i
    i += 1

if n != 1 and sol % n != 0:
    sol *= n

print(sol)


'''
Created on Oct 15, 2015

@author: Ismael
'''
from collections import Counter
n=int(input())
def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return factors

def product(l):
    p = 1
    for i in l:
        p *= i
    return p

print(product(Counter(prime_factors(n)).keys()))

#!/usr/bin/env python3
from functools import reduce
from operator import mul


def get_value(function):
    return function()


@get_value
def primes(size=10**6):
    sieve = [True for _ in (list(range(size)))]
    sieve[0] = False
    sieve[1] = False
    prime = 2
    while prime < size:
        for compound in range(2*prime, size, prime):
            sieve[compound] = False
        try:
            prime = sieve.index(True, prime + 1)
        except ValueError:
            break
    return [number for number, is_prime in enumerate(sieve) if is_prime]


def factorized(number):
    if number == 1:
        return [1]
    factors = []
    for prime in primes:
        if prime**2 > number:
            break
        while number % prime == 0:
            factors += [prime]
            number //= prime
    if number > 1:
        factors += [number]
    return factors


def main():
    print(reduce(mul, set(factorized(int(input())))))


def __starting_point():
    main()

__starting_point()

import math
n = int(input())
maxval = n
i = 2
while i*i <= n:
    while maxval%(i*i)==0:
        maxval //= i
    i+=1

print(maxval)

        


n = int(input())
from math import sqrt
from math import ceil

    

def prim(n):
    i = 2
    while i * i <= n:
        if n % (i**2) == 0:
            return i
        i += 1
    return 1
k = n
while  k > 1:
    k = prim(n)
    n = n // k
    

print(n)




import math
from sys import stdin, stdout

def check(k):
    i = 2
    i2 = i*i
    while i2 <= k:
        if k % i2 == 0:
            return False
        i += 1
        i2 = i*i
        
    return True

line = stdin.readline()
n = int(line)

ans = 0
sq_n = int(math.sqrt(n))
i = 1
while i <= sq_n:
    if n % i != 0:
        i += 1
        continue

    if check(i) == True:
        ans = max(ans, i)

    j = int(n / i)
    if check(j) == True:
        ans = max(ans, j)
    i += 1

print(ans)


__author__ = 'yarsanich'
import math
n = int(input())
"""
Flag = False
k = 0
check = (0**n) % n
ans = 1
while Flag == False:
      k += 1
      #print((k**n)%n)
      if ((k**n)%n == check):
          print(ans)
          break
      else:
          ans += 1
"""
ans = 1
if (n%2 == 0):
    ans *= 2
    while n%2 == 0:
        n /= 2
i = 3
while i<=int(math.sqrt(n))+1:
    if (n % i == 0):
        ans *= i
        while (n % i == 0):
            n /= i
    i += 2
if (n > 2):
    ans *= n
print(int(ans))

import sys
from math import ceil, sqrt

def factor(n):
    if n <= 1: return []
    prime = next((x for x in range(2, ceil(sqrt(n))+1) if n%x == 0), n)
    return [prime] + factor(n//prime)

n = int(sys.stdin.readline().rstrip('\n'))
setprimes = set(factor(n))
cumul = 1
for p in setprimes:
    cumul *= p
print(cumul)