#include <bits/stdc++.h>

using namespace std;

vector<pair<int, int> > SideInfos;

bool cmp(const pair<int, int> &s1, const pair<int, int> &s2) {
	if (s1.first == s2.first) {
		return s1.second < s2.second;
	}
	return s1.first < s2.first;
}

int main() {
	int h, w;

	SideInfos.clear();
	for (int i = 0; i < 6; ++i) {
		cin >> h >> w;
		if (h > w) {
			swap(h, w);
		}
		SideInfos.push_back(make_pair(h, w));
	}
	sort(SideInfos.begin(), SideInfos.end(), cmp);

	for (int i = 0; i < 3; ++i) {
		if (SideInfos[i].first != SideInfos[i+1].first) {
			cout << "no" << endl;
			return 0;
		}
	}
	for (int i = 2; i < 5; ++i) {
		if (SideInfos[i].second != SideInfos[i + 1].second) {
			cout << "no" << endl;
			return 0;
		}
	}
	if (SideInfos[0].second != SideInfos[1].second || SideInfos[4].first != SideInfos[5].first) {
		cout << "no" << endl;
		return 0;
	}
	if (SideInfos[1].second != SideInfos[4].first) {
		cout << "no" << endl;
		return 0;
	}
	cout << "yes" << endl;

	return 0;
}
