"use strict";
(function(input){
  input=input.trim().split(/\s+/).map(x=>x-0);
  const N=input.shift();
  const A=(N%3===0),
        B=((input.reduce((a,c)=>a+c*c,0))===0);
  if((!A)&&(!B)){
    console.log("No");
    return;
  }
  
})(require("fs").readFileSync("/dev/stdin","utf8"));