using System;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            int[] b = new int[6];
            int c = 0;
            for(int i = 0; i <= a - 1; i++)
            {
                c=i % 6;
                c++;
                for(int j = 1; j <= 6; j++)
                {
                    if (c == j)
                    {
                        b[j-1]++;
                        break;
                    }
                }
            }

            for(int x = 0; x <= 4; x++)
            {
                if (b[x] != b[x + 1])
                {
                    Console.WriteLine("No");
                    break;
                }else if (x == 4)
                {
                    Console.WriteLine("Yes");
                }

            }
            
        }
    }
}