#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
using namespace std;
int len[1010] = {},h[6],w[6],maxi=-1,cub[1010];
bool sc[1010],pc[1010];

 
int main(){
	for(int i=0; i<6; i++){
		cin >> h[i];
		if(maxi < h[i]) maxi = h[i];
		cin >> w[i];
		if(maxi < w[i]) maxi = w[i];
		if(h[i]==w[i])cub[h[i]]++;
		len[h[i]]++;
		len[w[i]]++;
	}

	for(int i=1; i<=maxi; i++){
		bool jud;
		if(cub[i] == 6)jud=true;
		else if(cub[i] == 2){
			if(len[i]%8 == 0) jud=true;
			else jud = false;
		}
		else if(cub[i] > 0)jud = false;
		else if(len[i]%4 != 0) jud = false;
		else jud = true;
		if(!jud){
			cout << "no" << endl;
			break;
		}
		if(i==maxi){
			cout << "yes" << endl;
		}
	}


    return 0;
}

