#include <bits/stdc++.h>
  
using namespace std;
  
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define pb push_back
#define all(r) (r).begin(),(r).end()
#define rall(r) (r).rbegin(),(r).rend()
#define fi first
#define se second
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
 
const int INF = 1e9;
const ll LINF = 1e18;
const ll MOD = 1e9 + 7;
double EPS = 1e-8;

int main(){
	map<pii, int> m;
	rep(i, 6) {
		int a, b;
		cin>>a>>b;
		if(a > b) swap(a, b);
		m[{a, b}]++;
	}
	map<int, int> m2;
	for(auto& p : m) if(p.se & 1) {
		cout<<"no"<<endl;
		return 0;
	}else m2[p.fi.fi]+=p.se, m2[p.fi.se]+=p.se;
	vi v;
	for(auto& p: m2) rep(i, p.se/4) v.pb(p.fi);
	if(v.size()!=3) {
		cout<<"no"<<endl;
		return 0;
	}
	int a = v[0], b = v[1], c = v[2];
	if(m.count({a, b}) && m.count({b, c}) && m.count({a, c})) cout<<"yes"<<endl;
	else cout<<"no"<<endl;
}