using System; using System.Linq; public class P1003 { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); if(n % 6 == 0) { Console.WriteLine("Yes"); } else { Console.WriteLine("No"); } } }