#include <bits/stdc++.h>
using namespace std;
#define int long long
#define UNIQUE(v) v.erase(unique(all(v)), v.end());
#define ZIP(v) sort(all(v)),UNIQUE(v)
#define ADD(a, b) a = (a + b) % mod
#define SUB(a, b) a = (a+mod-b)%mod
#define MUL(a, b) a = (a * b) % mod
#define repi(i,m,n) for(int i = m;i < n;i++)
#define drep(i,n,m) for(int i = n;i >= m;i--)
#define rep(i,n) repi(i,0,n)
#define rrep(i,n) repi(i,1,n+1)
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define dmp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define fi first
#define se second
typedef pair<int,int> P;
typedef pair<int, P> PP;
typedef pair<P, int> Pi;
typedef vector<int> vi;
typedef deque<int> dq;
const int inf = 1e9+7;
const int INF = 1e18+7;

vector<P> vs;
int solve(int a, int b, int c){
	if(a == b or b == c or a == c)return 0;
	vector<P> v;
	v.pb(vs[a]);v.pb(vs[b]);v.pb(vs[c]);
	int ans = 0;
	rep(i,2){
		rep(j,2){
			rep(k,2){
				if(v[0].fi == v[1].fi and v[0].se == v[2].fi and v[1].se == v[2].se)ans = 1;
				swap(v[2].fi, v[2].se);
			}
			swap(v[1].fi, v[1].se);
		}
		swap(v[0].fi, v[0].se);
	}
	return ans;
}

signed main(){
	rep(i,6){
		int x, y;
		scanf("%lld%lld", &x, &y);
		if(x > y)swap(x, y);
		vs.push_back(P(x, y));
	}
	int ans = 1, res = 0;
	sort(all(vs));
	rep(i,6)if(i%2 == 0)if(vs[i] != vs[i+1])ans = 0;
	rep(i,3)vs.erase(vs.begin()+i+1);
	rep(i,3)rep(j,3)rep(k,3)res += solve(i, j, k);
	if(ans and res)printf("yes\n");
	else printf("no\n");
	
	//printf("%lld\n", ans);
	//rep(i,vs.size())printf("%lld %lld\n", vs[i].fi, vs[i].se);
	return 0;
}






