function main(input) {
  var map = {};
  input[0].split(" ").forEach(v=>{
    map[v] = (map[v]||0)+1;
  });
  console.log(Object.keys(map).length == 2?"Yes":"No")

}

main(require('fs').readFileSync('/dev/stdin', 'utf8').split("\n"))
