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* &gt; 1 such that *a*<sup class="upper-index">2</sup> is a divisor of *x*.

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.
The first and only line of input contains one integer, *n* (1 ≤ *n* ≤ 10<sup class="upper-index">12</sup>).
import sys
import traceback
from contextlib import contextmanager
from io import StringIO


def squarefree(n):
    a = 1
    d = 2
    while d*d <=n:
        q, r = divmod(n, d)
        if not r:
            n = q
            a *= d
            q, r = divmod(n, d)
            while not r:
                n = q
                q, r = divmod(n, d)
        d += 1 if d == 2 else 2
    return a * n


def main():
    n = int(input())
    print(squarefree(n))


def log(*args, **kwargs):
    print(*args, **kwargs, file=sys.stderr)


@contextmanager
def patchio(i):
    try:
        sys.stdin = StringIO(i)
        sys.stdout = StringIO()
        yield sys.stdout
    finally:
        sys.stdin = sys.__stdin__
        sys.stdout = sys.__stdout__


def do_test(k, test):
    try:
        log(f"TEST {k}")
        i, o = test
        with patchio(i) as r:
            main()
        b = float(o)
        try:
            a, = map(float, r.getvalue().splitlines())
        except Exception:
            ok = False
        else:
            ok = abs(a-b)/max(1,b) <= 0.0001
        if ok:
            log("OK\n")
        else:
            log(f"Expected:\n{o}Got:\n{r.getvalue()}")
    except Exception:
        traceback.print_exc()
        log()


def test(ts):
    for k in ts or range(len(tests)):
        do_test(k, tests[k])


tests = [("""\
10
""", """\
10
"""), ("""\
12
""", """\
6
""")]


if __name__ == '__main__':
    from argparse import ArgumentParser
    parser = ArgumentParser()
    parser.add_argument('--test', '-t', type=int, nargs='*')
    args = parser.parse_args()
    main() if args.test is None else test(args.test)

