#include <bits/stdc++.h>
using namespace std;
struct rect {
  int h, w;
};
bool operator<(rect r1, rect r2) {
  if (r1.w == r2.w) {
    return r1.h > r2.h;
  }
  return r1.w > r2.w;
}
int main() {
  rect r[6];
  for (int i = 0; i < 6; i++) {
    cin >> r[i].h >> r[i].w;
    if (r[i].h > r[i].w) {
      swap(r[i].h, r[i].w);
    }
  }
  sort(r, r + 6);
  if (r[0].h == r[1].h && r[0].w == r[1].w && r[2].h == r[3].h &&
      r[2].w == r[3].w && r[4].h == r[5].h && r[4].w == r[5].w &&
      r[0].w == r[2].w && r[2].h == r[4].h && r[2].h == r[4].w) {
    cout << "yes" << endl;
  } else {
    cout << "no" << endl;
  }
  return 0;
}
