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