#include <bits/stdc++.h>
using namespace std;
class plane {
 public:
  int w, h;
};
bool operator==(plane &a, plane &b) {
  if (a.h > a.w) {
    swap(a.h, a.w);
  }
  if (b.h > b.w) {
    swap(b.h, b.w);
  }
  return a.h == b.h && a.w == b.w;
}
bool func(vector<plane> &);
int main() {
  vector<plane> line(6);
  for (int i = 0; i < 6; ++i) {
    cin >> line[i].h >> line[i].w;
  }
  cout << (func(line) ? "yes" : "no") << endl;
  return 0;
}
bool func(vector<plane> &line) {
  int pair = -1;
  for (int i = 1; i < 6; ++i) {
    if (line[i] == line[0]) {
      pair = i;
      break;
    }
  }
  if (pair == -1) {
    return false;
  }
  swap(line[1], line[pair]);
  for (int i = 3; i < 6; ++i) {
    swap(line[i], line[3]);
    if (line[2] == line[3] && line[4] == line[5]) {
      return true;
    }
    swap(line[i], line[3]);
  }
  return false;
}
