def lscan; gets.split.map(&:to_i); end puts lscan.reduce(:*)%3 == 0 ? 'Yes' : 'No'