#include <bits/stdc++.h>
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  int handan_same = a;
  int handan_different;
  int seki_same = a * b;
  int seki_different = 0;
  int same = 1;
  int different = 0;
  int i;
  for (i = 1; i < 6; i++) {
    scanf("%d %d", &a, &b);
    if (seki_same == a * b && (handan_same == a || handan_same == b)) {
      same++;
    } else {
      if (seki_different == 0) {
        handan_different = a;
        seki_different = a * b;
      }
      if (seki_different == a * b &&
          (handan_different == a || handan_different == b)) {
        different++;
      }
    }
  }
  if ((same == 4 && different == 2) || (same == 2 && different == 4) ||
      same == 6) {
    puts("yes");
  } else {
    puts("no");
  }
  return 0;
}
