loop do
  STDIN.readline rescue break

  parity = [0, 0, 0, 0, 0, 0, 0]

  dominoes = STDIN.readline.chomp.split(" ")
  dominoes.each do |domino|
    next if domino[0] == domino[1]

    domino.each do |num|
      parity[num.to_i] ^= 1
    end
  end

  odd_numbers = parity.select { |p| p == 1 }.size

  if [0, 2].include? odd_numbers
    puts "Yes"
  else
    puts "No"
  end
end