a = read_line.split.map &.to_i puts a.any? { |i| i % 3 == 0 } ? "Yes" : "No"