#include<bits/stdc++.h>
using namespace std;
int main(){
  int h[10]={},w[10]={};
  int s[10]={};
  int x;
  bool flag = true;
  for(int i=0; i<6; i++){
    cin >> h[i] >> w[i];
    if(h[i] > w[i]) swap(h[i],w[i]);
    s[i] = h[i] * w[i];
  }
  sort(h,h+6);
  sort(w,w+6);
  sort(s,s+6);
  /*
  for(int i=0; i<6; i++) cout << h[i] << " ";
  cout << endl;
  for(int i=0; i<6; i++) cout << w[i] << " ";
  */
  // for(int i=0; i<6; i++) cout << s[i] << " ";
  if(h[0]!=h[1] || h[2] != h[3] || h[4] != h[5] && w[0]!=w[1] || w[2] != w[3] || w[4] != w[5]){
    cout << "no" << endl;
    //cout << "hey" << endl;
  }
  else if(h[0] !=h[2] || w[0] != h[4] || w[2] != w[4]) cout << "no" << endl;
  else if(s[0]!=s[1] || s[2] != s[3] || s[4] != s[5]) cout << "no" << endl;
  else cout << "yes" << endl;
  return 0;
}
