#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);
  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;
  } else if (s[0] != s[1] || s[2] != s[3] || s[4] != s[5])
    cout << "no" << endl;
  else
    cout << "yes" << endl;
  return 0;
}
