import java.io.*; import java.util.*; public class Division3 { private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); private static StringTokenizer st; private static int readInt() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); return Integer.parseInt(st.nextToken()); } public static void main(String[] args) throws IOException { System.out.println(readInt() % 3 == 0 || readInt() % 3 == 0 || readInt() % 3 == 0 ? "Yes" : "No"); } }