def solve(): I=int(input()) return I%45==0 #================================================== print("Yes" if solve() else "No")