#include <bits/stdc++.h>

using namespace std;

int main() {
  vector<pair<int,int> > hw(6);
  for(auto&a:hw) {
    cin >> a.first >> a.second;
    if(a.first<a.second) swap(a.first,a.second);
  }
  sort(hw.rbegin(),hw.rend());
  bool flag=true;
  for(int i=0;i<6;i+=2)
    if(hw[i]!=hw[i+1]) flag=false;
  if(!(hw[0].first==hw[2].first&&hw[0].second==hw[4].first&&
       hw[2].second==hw[4].second)) flag=false;
  cout << (flag?"yes":"no") << endl;
  
  return 0;
}

