UJTEST1 - UJ Test 1

Detect

whether the following is an arithmetic series or not.

Input 

Each line contains space separated numbers.

HI

0
A line with only 0 is the end of input.

Output

'Yes' if input sequence is really an arithmetic series.
'No' otherwise.


Example

Input:

1 3 5 7

9 8 7 6 5 4

1 2 4 5

0

Output: Yes
Yes
No

ID RESULT TIME
code...



Added by:Mousa AL-Akhras
Date:2012-03-12
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All

hide comments
2012-03-12 18:12:39 Jared Deckard
Big int, try Python, NZEC instantly.
Blank lines, compiling then NZEC.
Single numbers, runs case 1 then NZEC.
hmmm...
2012-03-12 15:40:57 Ahmed AKram
what is the least number of numbers ?
2012-03-12 13:59:55 Adhityaa
what are the limits of the numbers ?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.