#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod 1e9+7

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

int main() {
  map<P, int> mp;
  for(int i = 0; i < 6; i++) {
    int a, b;
    cin >> a >> b;
    if(a > b) mp[P(b, a)]++;
    else mp[P(a, b)]++;
  }
  if(mp.size() > 3) {
    cout << "no" << endl;
    return 0;
  }
  if(mp.size() == 1) {
    map<P, int>::iterator it = mp.begin();
    if(it->first.first == it->first.second) cout << "yes" << endl;
    else cout << "no" << endl;
    return 0;
  }
  vector<P> v;
  for(map<P, int>::iterator it = mp.begin(); it != mp.end(); it++) {
    if(it->second == 2 || it->second == 4) {
      v.pb(P(it->first.first, it->first.second));
    }else {
      cout << "no" << endl;
      return 0;
    }
  }

  if(v.size() == 2) {
    if(v[0].first == v[0].second) {
      if(v[0].first == v[1].first || v[0].first == v[1].second) cout << "yes" << endl;
      else cout << "no" << endl;
      return 0;
    }else if(v[1].first == v[1].second) {
      if(v[1].first == v[0].first || v[1].first == v[0].second) cout << "yes" << endl;
      else cout << "no" << endl;
      return 0;
    }else {
      cout << "no" << endl;
    }
  }else if(v.size() == 3) {
    if(v[0].first == v[1].first) {
      if(v[0].second == v[2].first) {
        if(v[1].second == v[2].second) cout << "yes" << endl;
        else cout << "no" << endl;
      }else if(v[0].second == v[2].second) {
        if(v[1].second == v[2].first) cout << "yes" << endl;
        else cout << "no" << endl;
      }else {
        cout << "no" << endl;
      }
    }else if(v[0].first == v[1].second) {
      if(v[0].second == v[2].first) {
        if(v[1].first == v[2].second) cout << "yes" << endl;
        else cout << "no" << endl;

      }else if(v[0].second == v[2].second) {
        if(v[1].first == v[2].first) cout << "yes" << endl;
        else cout << "no" << endl;

      }else {
        cout << "no" << endl;
      }
    }else if(v[0].first == v[2].first) {
      if(v[0].second == v[1].first) {
        if(v[2].second == v[1].second) cout << "yes" << endl;
        else cout << "no" << endl;

      }else if(v[0].second == v[1].second) {
        if(v[2].second == v[1].first) cout << "yes" << endl;
        else cout << "no" << endl;

      }else {
        cout << "no" << endl;
      }
    }else if(v[0].first == v[2].second) {
      if(v[0].second == v[1].first) {
        if(v[2].first == v[1].second) cout << "yes" << endl;
        else cout << "no" << endl;

      }else if(v[0].second == v[1].second) {
        if(v[2].first == v[1].first) cout << "yes" << endl;
        else cout << "no" << endl;

      }else {
        cout << "no" << endl;
      }
    }else {
      cout << "no" << endl;
    }
  }
}