#サイコロの実装 n = input(int()) if (n % 6) + 1 == 0: print('yes') else: print('no')