#include <bits/stdc++.h>
using namespace std;
struct Info {
  int small, big;
};
int main() {
  Info info[6];
  int left, right;
  for (int i = 0; i < 6; i++) {
    scanf("%d %d", &left, &right);
    if (left <= right) {
      info[i].small = left;
      info[i].big = right;
    } else {
      info[i].small = right;
      info[i].big = left;
    }
  }
  for (int i = 1; i <= 5; i++) {
    for (int k = 5; k >= i; k--) {
      if ((info[k].small < info[k - 1].small) ||
          (info[k].small == info[k - 1].small &&
           info[k].big < info[k - 1].big)) {
        swap(info[k], info[k - 1]);
      }
    }
  }
  if (info[0].small == info[1].small && info[0].big == info[1].big &&
      info[2].small == info[3].small && info[2].big == info[3].big &&
      info[4].small == info[5].small && info[4].big == info[5].big) {
    printf("yes\n");
  } else {
    printf("no\n");
  }
  return 0;
}
