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