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