n = int(input()) l = [0]*6 for i in range(n): l[(i%6)]+=1 l.sort() if l[0] == l[5]: print("Yes") else: print("No")