import strutils, tables proc factorize(x:int): CountTable[int] = var x = x result = initCountTable[int]() var d = 2 while d*d <= x: while x mod d == 0: result.inc(d, 1) x = x div d d += 1 if x > 1: result.inc(x, 1) var x = stdin.readLine.parseInt res = 1 for k, v in factorize(x): if bool(v and 1): res *= k echo res