I=int(input()) D={} E=[] now=I while now not in D: D[now]=1 E.append(now) now=(now*2)%180 E=sorted(E) for i in range(len(E)-1): for j in range(i+1,len(E)): e=E[j]-E[i] if e==30 or e==60: print('No') exit() print('Yes')