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

typedef pair<int, int> P;

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  vector<P> a;
  int temp1, temp2;

  for(int i = 0;i < 6;++i){
    cin >> temp1 >> temp2;
    if(temp1 > temp2){
      a.push_back(P(temp1, temp2));
    }else{
      a.push_back(P(temp2, temp1));
    }
  }

  sort(a.begin(), a.end());

  if(a[0] == a[1] && a[2] == a[3] && a[4] == a[5]){
    bool flag = false;
    if(a[0].first == a[2].first && a[0].second == a[4].second && a[2].second == a[4].first) flag = true;
    if(a[0].second == a[2].first && a[0].first == a[4].second && a[2].second == a[4].first) flag = true;
    if(a[0].first == a[2].second && a[0].second == a[4].second && a[2].first == a[4].first) flag = true;
    if(a[0].second == a[2].second && a[0].first == a[4].second && a[2].first == a[4].first) flag = true;
    if(a[0].first == a[2].first && a[0].second == a[4].first && a[2].second == a[4].second) flag = true;
    if(a[0].second == a[2].first && a[0].first == a[4].first && a[2].second == a[4].second) flag = true;
    if(a[0].first == a[2].second && a[0].second == a[4].first && a[2].first == a[4].second) flag = true;
    if(a[0].second == a[2].second && a[0].first == a[4].first && a[2].first == a[4].second) flag = true;

    if(flag){
      cout << "yes" << endl;
    }else{
      cout << "no" << endl;
    }

  }else{
    cout << "no" << endl;
  }

  return 0;
}

