#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

int h[6], w[6];
int main() {
	map<int, int>t;
	rep(i, 6) {
		cin >> h[i] >> w[i];
		t[h[i]]++;
		if (h[i] != w[i])t[w[i]]++;
	}
	if (t.size() > 3) {
		puts("no"); return 0;
	}
	if (t.size() == 1)puts("yes");
	if (t.size() == 2) {
		auto p1 = *t.begin(), p2 = *t.rbegin();
		if ((p1.second == 6 && p2.second == 4) || (p1.second == 4 && p2.second == 6))puts("yes");
		else puts("no");
	}
	if (t.size() == 3) {
		auto p1 = *t.begin(), p2 = *++t.begin(), p3 = *t.rbegin();
		if (p1.second == 4 && p2.second == 4 && p3.second == 4)puts("yes");
		else puts("no");
	}
}