#include <bits/stdc++.h>
using namespace std;
int main() {
  int h, w, s = 0, t = 0, u = 0, count = 0, v, a, b, c;
  bool f = false;
  int m[1000][1000] = {};
  for (int i = 0; i < 6; i++) {
    cin >> h >> w;
    if (h < w) {
      int tmp = h;
      h = w;
      w = tmp;
    }
    m[h][w]++;
  }
  for (int i = 0; i < 1000; i++) {
    for (int j = 0; j < 1000; j++) {
      if (m[i][j] == 2) t++;
      if (m[i][j] == 4) s++;
      if (m[i][j] == 6) u++;
    }
  }
  if (s == 1 && t == 1) v = 0;
  if (t == 3) v = 1;
  for (int i = 0; i < 1000; i++) {
    if (u == 1) {
      f = true;
      break;
    }
    for (int j = 0; j < 1000; j++) {
      if (v == 0) {
        if (m[i][j] == 2 || m[i][j] == 4) {
          if (count == 0) {
            a = i;
            b = j;
            count++;
          } else if (i == a || i == b || j == a || j == b)
            f = true;
        }
      }
      if (v == 1) {
        if (m[i][j] == 2) {
          if (count == 0) {
            a = i;
            b = j;
            count++;
          } else if (count == 1 && i == a || i == b || j == a || j == b) {
            if (i == a || i == b)
              c = j;
            else if (j == a || j == b)
              c = i;
            count++;
          } else if (count == 2) {
            if (i == a || i == b || i == c || j == a || j == b || j == c)
              f = true;
          }
        }
      }
    }
  }
  if (f == true)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
