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