puts [[0, 3],[1, 2],[0, 1],[0, 5],[1, 4],[2, 3],[1, 6],[2, 5],[3, 4],[3, 6],[4, 5]].include?(gets.split.map{|i|i.to_i.abs}.sort)?:YES:'NO'