func main() var a: int :: cui@inputInt() var b: int :: cui@inputInt() var sum: int :: a + b var factors: []int :: math@primeFactors(sum) var factorsA: []int :: math@primeFactors(a) var factorsB: []int :: math@primeFactors(a) var ans: int :: 1 for i(0, ^factors - 1) for j(0, ^factorsA - 1) if(factors[i] = factorsA[j]) do factors[i] :: 1 do ans :* factorsA[j] end if end for end for for i(0, ^factors - 1) for j(0, ^factorsB - 1) if(factors[i] = factorsB[j]) do factors[i] :: 1 do ans :* factorsB[j] end if end for end for do cui@print("\{ans}\n") end func