#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>

using namespace std;

bool isCuboid(vector<pair<int, int> > &d)
{
  for (int i = 0; i < 6; i++) {
    if (d[i].first > d[i].second) {
      swap(d[i].first, d[i].second);
    }
  }
  sort(d.begin(), d.end());
  for (int i = 0; i < 6; i += 2) {
    if (d[i] != d[i + 1]) return false;
  }
  if (d[0].first == d[2].first && d[2].second == d[4].second
      && d[4].first == d[0].second) {
    return true;
  } else {
    return false;
  }
}

int main()
{
  vector<pair<int, int> > hw(6);
  for (int i = 0; i < 6; i++) {
    cin >> hw[i].first >> hw[i].second;
  }

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


