#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef pair<int,int> Paint;

int main(){
  vector<Paint> a;
  for(int i = 0; 6 > i; i++){
    int te,mp;cin>>te>>mp;
    if(te < mp)swap(te,mp);
    a.push_back(make_pair(te,mp));
  }
  sort(a.begin(),a.end());
  vector<int> b;
  for(int i = 0; 6 > i; i+=2){
    if(!(a[i].first==a[i+1].first&&a[i].second==a[i+1].second)){
      cout << "no" << endl;
      return 0;
    }else{
      b.push_back(a[i].first);
      b.push_back(a[i].second);
    }
  }
  int x = b[0];
  int y = b[1];
  
  for(int i = 2; 4 > i; i++){//23
    for(int j = 4; 6 > j; j++){//45
      if(min(x,y) == min(b[i],b[j]) && max(x,y) == max(b[i],b[j])){
        if(b[(i==2?3:2)] == b[(j==4?5:4)]){
          cout << "yes" << endl;
          return 0;
        }
      }
    }
  }
  cout << "no" << endl;
}
