#include <iostream>
#include <algorithm>
#include <array>
#include <math.h>
#include <set>
#include <stdlib.h>
#include <string>
#include <vector>

#define INT_MAX 2000000000
#define INF 1000000000
#define MOD 1000000007
#define ll long long
#define rep(i,a,b) for(i = (a); i < (b); i++)
#define bitget(a,b) (((a) >> (b)) & 1)

using namespace std;

int i, j, k;

int main() {
	int h[6], w[6];
	rep(i, 0, 6)
		cin >> h[i] >> w[i];
	int a[6];
	int flag = 0;
	rep(i, 0, 6)
		a[i] = 10000 * min(h[i], w[i]) + max(h[i], w[i]);
	sort(a,a+6);
	if ((a[0] == a[1]) && (a[2] == a[3]) && (a[4] == a[5])) {
		if ((a[0] / 10000 == a[2] / 10000) && (a[0] % 10000 == a[4] / 10000) && (a[2] % 10000 == a[4] % 10000)) {
			cout << "yes" << endl;
			flag = 1;
		}
	}
	if (flag == 0) {
		cout << "no" << endl;
	}
	return 0;
}