|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||1024 MB||6||5||5||83.333%|
Computing using integers is a dream for every programmer. That is, you do not have to deal with floating point numbers, estimated errors, and etc. We do not even need any floating point units in our computers for divisions!
Your company claimed there is a brand new computational model that solves integer problems efficiently. As a software engineer in this Integer Computing Processors Company (ICPC), you are going to write a validator that checks the following:
Given a list of positive integers A, . . . , A[n − 1]. Suppose you pick three different elements arbitrarily of this list, A[i], A[j], A[k] with i, j, k being mutually different. Is it true that (A[i]−A[j])/A[k] is always an integer?
The first line of the input contains one integer n indicating the number of positive integers in the list. The second line of the input contains n positive integers A, . . . , A[n − 1] separated by blanks.
If (A[i]−A[j])/A[k] is always an integer, then output yes. Otherwise output no.
5 1 1 1 1 4
5 1 2 4 8 16