#include <iostream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include <stack>
#include <bitset>
using namespace std;

struct square{
	int w;
	int h;
};
int main(){
	square face[6];
	int i, j, ipow, jpow, T, F, R, Flags = 0;
	for (i = 0; i < 6; i++){
		cin >> face[i].h >> face[i].w;
		if (face[i].w > face[i].h) swap(face[i].w, face[i].h);
	}
	for (i = 0; i < 5; i++){
		for (j = i + 1; j < 6; j++){
			ipow = pow(2, i); jpow = pow(2, j);
			if (face[i].w == face[j].w && face[i].h == face[j].h && (Flags & ipow) == 0 && (Flags & jpow) == 0){
				Flags += ipow; Flags += jpow;
				T = i;
				break;
			}
		}
		if (j < 6) break;
	}
	if (i == 4 && j == 5){ cout << "no" << endl; return 0; }
	for (i = 0; i < 5; i++){
		for (j = i + 1; j < 6; j++){
			ipow = pow(2, i); jpow = pow(2, j);
			if (face[i].w == face[j].w && face[i].h == face[j].h && (Flags & ipow) == 0 && (Flags & jpow) == 0){
				Flags += ipow; Flags += jpow;
				F = i;
				break;
			}
		}
		if (j < 6) break;
	}
	if (i == 4 && j == 5){ cout << "no" << endl; return 0; }
	for (i = 0; i < 6; i++){ ipow = pow(2, i); if ((Flags&ipow) == 0){ Flags += ipow; R = i; break; } }
	for (i = 0; i < 6; i++){ ipow = pow(2, i); if ((Flags&ipow) == 0){ Flags += ipow; break; } }
	if (face[R].w != face[i].w || face[R].h != face[i].h){ cout << "no" << endl; return 0; }
	if (face[T].w == face[F].w && face[T].h == face[R].w && face[F].h == face[R].h){ cout << "yes" << endl; return 0; }
	if (face[T].w == face[F].w && face[T].h == face[R].h && face[F].h == face[R].w){ cout << "yes" << endl; return 0; }
	if (face[T].w == face[F].h && face[T].h == face[R].w && face[F].w == face[R].h){ cout << "yes" << endl; return 0; }
	if (face[T].w == face[F].h && face[T].h == face[R].h && face[F].w == face[R].w){ cout << "yes" << endl; return 0; }
	if (face[T].h == face[F].w && face[T].w == face[R].w && face[F].h == face[R].h){ cout << "yes" << endl; return 0; }
	if (face[T].h == face[F].w && face[T].w == face[R].h && face[F].h == face[R].w){ cout << "yes" << endl; return 0; }
	if (face[T].h == face[F].h && face[T].w == face[R].w && face[F].w == face[R].h){ cout << "yes" << endl; return 0; }
	if (face[T].h == face[F].h && face[T].w == face[R].h && face[F].w == face[R].w){ cout << "yes" << endl; return 0; }
	cout << "no" << endl;
	return 0;
}
