
#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;
  rep(i, 0, 6) {
    int h, w;
    cin >> h >> w;
    mp[P(min(h, w), max(h, w))]++;
  }
  vector<P> v;
  for(auto x : mp) {
    if(x.second % 2 == 1) {
      cout << "no" << endl;
      return 0;
    }
    rep(i, 0, x.second / 2) v.pb(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].first) 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].first) 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].first) 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].first) f = 1;
  }
  if(f) cout << "yes" << endl;
  else cout << "no" << endl;
}