#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int>> v;
  set<int> s;
  int x, y;
  for (int i = 0; i < 6; i++) {
    cin >> x >> y;
    s.insert(x);
    s.insert(y);
    if (x > y) swap(x, y);
    v.push_back({x, y});
  }
  sort(v.begin(), v.end());
  bool judge = s.size() <= 3;
  for (int i = 0; i < 3; i++) {
    if (v[2 * i].first != v[2 * i + 1].first) judge = false;
    if (v[2 * i].second != v[2 * i + 1].second) judge = false;
  }
  if (judge)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
