Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a=raw_input().split()
- c=[]
- for b in a:
- c.append(int(b))
- i=1
- x=0
- z=1
- schetchik2=1
- schetchik=0
- shag=1
- if len(c)==1:
- print "yes"
- else:
- while c[i-1]==c[i] and i<len(c)-1:
- shag+=1
- i+=1
- hi = c[shag]-c[shag-1]
- while x<shag:
- if c[x:len(c):shag]==c[0:len(c):shag]:
- schetchik+=1
- x+=1
- if shag == len(c)-1:
- print "yes"
- else:
- while z< (len(c)/shag):
- if (c[z*shag]-c[(z*shag)-1])**2 == hi*hi:
- schetchik2+=1
- z+=1
- if (schetchik == shag and schetchik2 == len(c)/shag):
- print "yes"
- else:
- print "no"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement