# coding: utf-8 N = gets.to_i if N % 6 == 0 then puts "Yes" else puts "No" end