시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1303 940 844 73.776%

문제

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

입력

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

출력

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

예제 입력 1

2
75 125

예제 출력 1

1
5
25
W3sicHJvYmxlbV9pZCI6IjU2MTgiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWFjZjVcdWM1N2RcdWMyMTgiLCJkZXNjcmlwdGlvbiI6IjxwPlxyXG5cdFx1Yzc5MFx1YzVmMFx1YzIxOCBuXHVhYzFjXHVhYzAwIFx1YzhmY1x1YzViNFx1YzljNFx1YjJlNC4gXHVjNzc0IFx1Yzc5MFx1YzVmMFx1YzIxOFx1Yzc1OCBcdWFjZjVcdWM1N2RcdWMyMThcdWI5N2MgXHViYWE4XHViNDUwIFx1YWQ2Y1x1ZDU1OFx1YjI5NCBcdWQ1MDRcdWI4NWNcdWFkZjhcdWI3YThcdWM3NDQgXHVjNzkxXHVjMTMxXHVkNTU4XHVjMmRjXHVjNjI0LjxcL3A+XHJcbiIsImlucHV0IjoiPHA+XHJcblx0XHVjY2FiXHVjOWY4IFx1YzkwNFx1YzVkMCBuXHVjNzc0IFx1YzhmY1x1YzViNFx1YzljNFx1YjJlNC4gblx1Yzc0MCAyIFx1YjYxMFx1YjI5NCAzXHVjNzc0XHViMmU0LiBcdWI0NThcdWM5ZjggXHVjOTA0XHVjNWQwXHViMjk0IFx1YWNmNVx1YzU3ZFx1YzIxOFx1Yjk3YyBcdWFkNmNcdWQ1NzRcdWM1N2MgXHVkNTU4XHViMjk0IFx1YzgxNVx1YzIxOCBuXHVhYzFjXHVhYzAwIFx1YzhmY1x1YzViNFx1YzljNFx1YjJlNC4mbmJzcDtcd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