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

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second

template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }

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

const ll INF = 1e9+100;
const ll MOD = 1e9+7;
const bool debug = 0;

int h[6], w[6];

int main() {
	map<pii, int> m;
	
	REP(i, 6) {
		scanf("%d %d", h + i, w + i);
		if (h[i] < w[i]) swap(h[i], w[i]);
		m[pii(h[i], w[i])]++;
	}
	
	bool ok = true;
	int c = 0;
	
	vector<pii> v;
	for (map<pii, int>::iterator it = m.begin(); it != m.end(); ++it) {
		if (it->se & 1) ok = false;
		REP(i, it->se / 2) v.push_back(it->fi);
	}
	if (v.size() != 3) ok = false;
	
	if (ok) {
		ok = false;
		REP(t1, 2) REP(t2, 2) REP(t3, 2) {
			pii p1 = v[0]; if (t1) swap(p1.fi, p1.se);
			pii p2 = v[1]; if (t2) swap(p2.fi, p2.se);
			pii p3 = v[2]; if (t3) swap(p3.fi, p3.se);
			
			if (p1.fi == p2.fi && p3.fi == p1.se && p3.se == p2.se) ok = true;
			swap(p2, p3);
			if (p1.fi == p2.fi && p3.fi == p1.se && p3.se == p2.se) ok = true;
		}
	}
	
	puts(ok ? "yes" : "no");
	return 0;
}