#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.txt"

bool check(vector<pair<int, int>>v) {
	return v[0].first == v[1].first&&v[0].second == v[2].first&&
		v[1].second == v[2].second;
}

int main() {
	map<pair<int, int>, int>mp;

	for (int i = 0; i < 6; ++i) {
		int a, b; cin >> a >> b;
		if (a > b)swap(a, b);
		mp[make_pair(a, b)]++;
	}
	bool ok = true;
	for (auto m : mp) {
		if (m.second %2)ok = false;
	}
	if (ok) {

		pair<int, int>p;
		pair<int, int>q;
		pair<int, int>r;
		if (mp.size() == 3) {

			p = (mp.begin()->first);
			q = (next(mp.begin())->first);
			r = (next(next(mp.begin()))->first);
		}
		else if (mp.size() == 2) {

			p = (mp.begin()->first);
			q = (next(mp.begin())->first);
			if (mp.begin()->second == 2)r = q;
			else r = p;
		}
		else {
			p = q = r = (mp.begin()->first);
			
		}

		vector<pair<int, int>>av{ p,q,r };
		sort(av.begin(), av.end());
		if (!(check(av)))ok = false;
	}

	if (ok)cout << "yes" << endl;
	else cout << "no" << endl;
	
	return 0;
}