#include <iostream>
using namespace std;

int main(){
  int th,tw;
  int vals[1000000]={};
  int uv[1000]={};
  int db=0;
  for (int i=0;i<6;i++){
    cin >> th>>tw;
    if (th>tw)swap(th,tw);
    vals[(th-1)*1000+(tw-1)]++;
    uv[th]++;
    uv[tw]++;
    if (th==tw){
      if (db==0)db=th;
      else if (db!=th){
	cout << "no"<<endl;
	return 0;
      }
    }
  }
  for (int i=0;i<1000;i++){
    for (int j=0;j<1000;j++){
      if (vals[i*1000+j]%2){
	cout <<"no"<<endl;
	return 0;
      }
    }
    if (uv[i]%4){
      cout <<"no"<<endl;
      return 0;
    }
  }
  cout << "yes" << endl;
  return 0;
}