#include <bits/stdc++.h>
using namespace std;

int main(){
	vector<pair<int, int>> ydk;
	
	for(int i = 0;i < 6;i++){
		int h, w; cin >> h >> w;
		if(h > w) swap(h, w);
		ydk.push_back({h, w});
	}
	
	sort(ydk.begin(), ydk.end());
	
	for(int i = 0;i < 3;i++){
		if(ydk[i*2] != ydk[i*2+1]){
			cout << "no" << endl;
			return 0;
		}
	}
	
	pair<int, int> a, b, c;
	a = ydk[0], b = ydk[2], c = ydk[4];
	
	string OK = "no";
	if(a.first == b.first){
		if(b.second == c.first && c.second == a.second){
			OK = "yes";
		}else if(b.second == c.second && c.first == a.second){
			OK = "yes";
		}
	}
	
	if(a.first == b.second){
		if(b.first == c.first && c.second == a.second){
			OK = "yes";
		}else if(b.first == c.second && c.first == a.second){
			OK = "yes";
		}
	}
	
	if(a.second == b.first){
		if(b.second == c.first && c.second == a.first){
			OK = "yes";
		}else if(b.second == c.second && c.first == a.first){
			OK = "yes";
		}
	}
	
	if(a.second == b.second){
		if(b.first == c.first && c.second == a.first){
			OK = "yes";
		}else if(b.first == c.second && c.first == a.first){
			OK = "yes";
		}
	}
	
	cout << OK << endl;	
	return 0;
}
			 
