#include <bits/stdc++.h>

#define REP(i ,n) for(int i=0 ;i < n; i++)
#define REPB(i ,n) for(int i=n; i >= 0; i--)
#define FOR(i ,m ,n) for(int i=m; i < n; i++)
#define FORB(i, m, n) for(int i=m; i>= m; i--)
#define ll long long
#define pb push_back
#define popb pop_back
#define debug(i) cout << i << endl
using namespace std;
int main(){
  int h,w;
  vector<pair<int,int>> bx;
  REP(i,6){
      cin >> h >> w;
      if(h < w) bx.pb(make_pair(h,w));
      else bx.pb(make_pair(w,h));
    }
    sort(bx.begin(),bx.end());
    
    REP(i,3){
        if(bx[2*i + 1].first != bx[2* i].first || bx[2* i + 1].second != bx[2*i].second){
            cout << "no" << endl;
            return 0;
          }
      }
    if(bx[0].first == bx[2].first){
        if(bx[0].second < bx[2].second){
            if(bx[4].first != bx[0].second || bx[4].second != bx[2].second){
                cout << "no" << endl;
                return 0;
              }
          }else{
            if(bx[4].second != bx[0].second || bx[4].first != bx[2].second){
                cout << "no" << endl;
                return 0;
              }
            }
      }else if(bx[0].first == bx[2].second){
        if(bx[0].second < bx[2].second){
            if(bx[4].first != bx[0].second || bx[4].second != bx[2].first){
                cout << "no" << endl;
                return 0;
              }
          }else{
            if(bx[4].second != bx[0].second || bx[4].first != bx[2].first){
                cout << "no" << endl;
                return 0;
              }
            }
        }else{
            cout << "no" << endl;
            return 0;
          }   
      cout << "yes" << endl;
      return 0;
}

