#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 a, b;
    cin >> a >> b;
    if (a > b)
      mp[pair<int, int>(b, a)]++;
    else
      mp[pair<int, int>(a, b)]++;
  }
  if (mp.size() > 2) {
    cout << "no" << endl;
    return 0;
  }
  if (mp.size() == 1) {
    map<pair<int, int>, int>::iterator it = mp.begin();
    if (it->first.first == it->first.second)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
    return 0;
  }
  int s = 1, f = 1;
  for (map<pair<int, int>, int>::iterator it = mp.begin(); it != mp.end();
       it++) {
    if (it->second == 2) {
      if (!s) {
        cout << "no" << endl;
        return 0;
      }
      s = 0;
    } else if (it->second == 4) {
      f = 0;
    } else {
      cout << "no" << endl;
      return 0;
    }
  }
  cout << "yes" << endl;
}
