#include <bits/stdc++.h>
using namespace std;
int main() {
  int input[12];
  int h[6], w[6];
  for (int i = 0; i < 6; i++) {
    cin >> h[i] >> w[i];
    input[i * 2] = h[i];
    input[i * 2 + 1] = w[i];
  }
  sort(input, input + 12);
  bool flag = false;
  if (input[0] == input[3] && input[4] == input[11]) {
    if (input[3] != input[4]) {
      int minn = input[3];
      for (int i = 0; i < 6; i++) {
        if (h[i] == w[i]) {
          if (minn == h[i]) {
            flag = true;
            cout << "no" << endl;
            break;
          }
        }
      }
      if (!flag) {
        cout << "yes" << endl;
      }
    } else {
      cout << "yes" << endl;
    }
  } else if (input[0] == input[7] && input[8] == input[11]) {
    if (input[7] != input[8]) {
      int minn = input[8];
      for (int i = 0; i < 6; i++) {
        if (h[i] == w[i]) {
          if (h[i] == minn) {
            flag = true;
            cout << "no" << endl;
            break;
          }
        }
      }
      if (!flag) {
        cout << "yes" << endl;
      }
    } else {
      cout << "yes" << endl;
    }
  } else {
    cout << "no" << endl;
  }
  return 0;
}
