N = int(input()) p=[] for i in range(1,N+1): a = i%6+1 p.append(a) if len(set(p))==len(p): print("Yes") else: print("No")