N = int(input()) counter= [0]*6 for i in range(N): a = i%6 counter[a]+=1 if len(set(counter))==1: print("Yes") else: print("No")