#include <bits/stdc++.h>
using namespace std;
int main() {
  map<pair<int, int>, int> surface;
  set<int> appear;
  int h, w;
  for (int i = 0; i < 6; i++) {
    cin >> h >> w;
    if (h > w) swap(h, w);
    surface[{h, w}]++;
    appear.insert(h);
    appear.insert(w);
  }
  bool judge = true;
  if (appear.size() > 3) {
    judge = false;
  } else if (appear.size() == 1) {
    judge = true;
  } else {
    for (auto p : surface) {
      if (p.second % 2 != 0) judge = false;
    }
  }
  if (judge)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
