#include <bits/stdc++.h>
using namespace std;
void No(int);
int main() {
  int a, x;
  int b[3][2];
  int k = 0;
  int sk[3] = {};
  for (int i = 0; i < 6; i++) {
    cin >> a >> x;
    if (a < x) swap(a, x);
    if (k == 0) {
      b[k][0] = a;
      b[k][1] = x;
      k++;
    } else {
      int f = 0;
      int ze = 0, on = 1;
      for (int j = 0; j < k; j++) {
        for (int l = 0; l < 2; l++) {
          if (a == b[j][ze] && x == b[j][on] && sk[j] == 0) {
            f = 1;
            sk[j] = 1;
            break;
          }
          swap(ze, on);
        }
        if (f == 1) break;
      }
      if (f == 0) {
        if (k > 2 || k == -1) {
          k = -1;
          continue;
        }
        b[k][0] = a;
        b[k][1] = x;
        sk[k] = 0;
        k++;
      }
    }
  }
  if (k == -1) {
    No(1);
    return 0;
  }
  int st;
  int fl = 0;
  int f, g;
  for (int i = 1; i < k; i++) {
    if (b[0][0] == b[i][0]) {
      f = i;
      g = 0;
      fl = 1;
      st = b[i][1];
      break;
    }
    if (b[0][0] == b[i][1]) {
      f = i;
      g = 1;
      fl = 1;
      st = b[i][0];
    }
  }
  if (fl == 0) {
    No(2);
    return 0;
  }
  if (f == 1)
    f = 2;
  else if (f == 2)
    f = 1;
  if (b[f][0] == b[0][1]) {
    if (b[f][1] != st) {
      No(3);
      return 0;
    }
  } else if (b[f][1] == b[0][1]) {
    if (b[f][0] != st) {
      No(4);
      return 0;
    }
  } else {
    No(5);
    return 0;
  }
  cout << "yes" << endl;
  return 0;
}
void No(int a) { cout << "no" << endl; }
