#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
pair<int, int>x[6];
vector<int>vec;
int main() {
	for (int i = 0; i < 6; i++) {
		int a, b; cin >> a >> b; if (a > b)swap(a, b);
		x[i] = make_pair(a, b);
		vec.push_back(a);
		vec.push_back(b);
	}
	sort(x, x + 6);
	for (int i = 0; i < vec.size(); i++) {
		for (int j = 0; j < vec.size(); j++) {
			for (int k = 0; k < vec.size(); k++) {
				if (x[0] != make_pair(vec[i], vec[j]))continue;
				if (x[1] != make_pair(vec[i], vec[j]))continue;
				if (x[2] != make_pair(vec[i], vec[k]))continue;
				if (x[3] != make_pair(vec[i], vec[k]))continue;
				if (x[4] != make_pair(vec[j], vec[k]))continue;
				if (x[5] != make_pair(vec[j], vec[k]))continue;
				cout << "yes" << endl;
				return 0;
			}
		}
	}
	cout << "no" << endl;
	return 0;
}