시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1550 1010 907 72.560%

문제

자연수 n개가 주어진다. 이 자연수의 공약수를 모두 구하는 프로그램을 작성하시오.

입력

첫째 줄에 n이 주어진다. n은 2 또는 3이다. 둘째 줄에는 공약수를 구해야 하는 자연수 n개가 주어진다. 모든 자연수는 108 이하이다.

출력

입력으로 주어진 n개 수의 공약수를 한 줄에 하나씩 증가하는 순서대로 출력한다.

예제 입력 1

2
75 125

예제 출력 1

1
5
25
W3sicHJvYmxlbV9pZCI6IjU2MTgiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWFjZjVcdWM1N2RcdWMyMTgiLCJkZXNjcmlwdGlvbiI6IjxwPlx1Yzc5MFx1YzVmMFx1YzIxOCBuXHVhYzFjXHVhYzAwIFx1YzhmY1x1YzViNFx1YzljNFx1YjJlNC4gXHVjNzc0IFx1Yzc5MFx1YzVmMFx1YzIxOFx1Yzc1OCBcdWFjZjVcdWM1N2RcdWMyMThcdWI5N2MgXHViYWE4XHViNDUwIFx1YWQ2Y1x1ZDU1OFx1YjI5NCBcdWQ1MDRcdWI4NWNcdWFkZjhcdWI3YThcdWM3NDQgXHVjNzkxXHVjMTMxXHVkNTU4XHVjMmRjXHVjNjI0LjxcL3A+XHJcbiIsImlucHV0IjoiPHA+XHVjY2FiXHVjOWY4IFx1YzkwNFx1YzVkMCBuXHVjNzc0IFx1YzhmY1x1YzViNFx1YzljNFx1YjJlNC4gblx1Yzc0MCAyIFx1YjYxMFx1YjI5NCAzXHVjNzc0XHViMmU0LiBcdWI0NThcdWM5ZjggXHVjOTA0XHVjNWQwXHViMjk0IFx1YWNmNVx1YzU3ZFx1YzIxOFx1Yjk3YyBcdWFkNmNcdWQ1NzRcdWM1N2MgXHVkNTU4XHViMjk0IFx1Yzc5MFx1YzVmMFx1YzIxOCZuYnNwO25cdWFjMWNcdWFjMDAgXHVjOGZjXHVjNWI0XHVjOWM0XHViMmU0LiZuYnNw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