//Kinniku kaihou
#include <iostream>
#include <algorithm>
using namespace std;

int h[6], w[6];

int main() {
	int i, j, k, l;
	int len[12];
	
	for (i = 0; i < 6; i++) {
		cin >> h[i] >> w[i];
		len[2 * i] = h[i];
		len[2 * i + 1] = w[i];
	}
	sort(len, len + 12);
	
	for (i = 0; i < 12; i++) {
		for (j = i + 1; j < 12; j++) {
			for (k = j + 1; k < 12; k++) {
				int a[6];
				a[0] = len[i] * 2000 + len[j];
				a[1] = len[i] * 2000 + len[j];
				a[2] = len[j] * 2000 + len[k];
				a[3] = len[j] * 2000 + len[k];
				a[4] = len[i] * 2000 + len[k];
				a[5] = len[i] * 2000 + len[k];
				
				int b[6];
				for (l = 0; l < 6; l++) {
					if (h[l] < w[l]) { b[l] = h[l] * 2000 + w[l]; }
					else { b[l] = w[l] * 2000 + h[l]; }
				}
				sort(a, a + 6);
				sort(b, b + 6);
				
				for (l = 0; l < 6; l++) {
					if (a[l] != b[l]) {
						break;
					}
				}
				if (l == 6) {
					cout << "yes" << endl;
					return 0;
				}
			}
		}
	}
	cout << "no" << endl;
	return 0;
}