#include <bits/stdc++.h>
using namespace std;
__attribute__((constructor)) void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
int main() {
  map<pair<int, int>, int> mp;
  for (int i = (0); i < (6); i++) {
    int h, w;
    cin >> h >> w;
    mp[pair<int, int>(min(h, w), max(h, w))]++;
  }
  vector<pair<int, int> > v;
  for (auto x : mp) {
    if (x.second % 2 == 1) {
      cout << "no" << endl;
      return 0;
    }
    for (int i = (0); i < (x.second / 2); i++) v.push_back(x.first);
  }
  int f = 0;
  if (v[0].first == v[1].first) {
    if (v[0].second == v[2].first && v[1].second == v[2].second) f = 1;
    if (v[0].second == v[2].second && v[1].second == v[2].second) f = 1;
  }
  if (v[0].first == v[1].second) {
    if (v[0].second == v[2].first && v[1].first == v[2].second) f = 1;
    if (v[0].second == v[2].second && v[1].first == v[2].second) f = 1;
  }
  if (v[0].second == v[1].first) {
    if (v[0].first == v[2].first && v[1].second == v[2].second) f = 1;
    if (v[0].first == v[2].second && v[1].second == v[2].second) f = 1;
  }
  if (v[0].second == v[1].second) {
    if (v[0].first == v[2].first && v[1].first == v[2].second) f = 1;
    if (v[0].first == v[2].second && v[1].first == v[2].second) f = 1;
  }
  if (f)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
