#include<bits/stdc++.h>

#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)

using namespace std;

typedef pair<int,int> ii;

int h[6],w[6];

bool check(map<ii,int> &mp) {
  rep(i,6) {
    if( mp[ii(h[i],w[i])] < 2 ) continue;
    set<int> base;
    for(auto v : mp) if( v.second ) {
	base.insert(v.first.first);
	base.insert(v.first.second);
    }
    for(auto v : base) {
      map<ii,int> mp2;
      mp2[ii(h[i],w[i])] += 2;
      rep(j,2) {
	ii s = ii(h[i],v);
	if( s.first > s.second ) swap(s.first,s.second);
	++mp2[s];
      }
      rep(j,2) {
	ii s = ii(w[i],v);
	if( s.first > s.second ) swap(s.first,s.second);
	++mp2[s];
      }
      if( mp2 == mp ) return true;
    }
  }
  return false;
}

int main() {
  map<ii,int> mp;
  rep(i,6) {
    cin >> h[i] >> w[i];
    if( h[i] > w[i] ) swap(h[i],w[i]);
    ++mp[ii(h[i],w[i])];
  }
  puts(check(mp)?"yes":"no");
  return 0;
}