#include <bits/stdc++.h>
using namespace std;
int main() {
  int a2, a4, a6, b2, b4, b6, c, q, i, j, z = 0, k = 1, m[1000][1000] = {0};
  int a[1000] = {0}, b[1000] = {0}, w[1000] = {0}, e[5][2] = {0};
  for (a2 = a4 = a6 = b2 = b4 = b6 = i = 0; i < 6; i++) {
    cin >> q >> c;
    w[q]++;
    w[c]++;
    if (q > c)
      m[q][c]++;
    else
      m[c][q]++;
  }
  for (i = 0; i < 1000; i++) {
    for (j = 0; j < 1000; j++) {
      if (m[i][j]) {
        a[j] += m[i][j];
        b[i] += m[i][j];
        if (m[i][j] == 4) {
          e[z][0] = i;
          e[z++][1] = j;
          e[z][0] = i;
          e[z++][1] = j;
        } else {
          e[z][0] = i;
          e[z++][1] = j;
        }
      }
    }
  }
  if (e[0][0] != e[2][1] || e[1][0] != e[2][0] || e[0][1] != e[1][1]) k = 0;
  for (i = 0; i < 1000; i++) {
    if (w[i] % 4) k = 0;
    if (a[i] == 4) a4++;
    if (a[i] == 2) a2++;
    if (a[i] == 6) a6++;
    if (b[i] == 4) b4++;
    if (b[i] == 2) b2++;
    if (b[i] == 6) b6++;
  }
  if (a4 && a2 && b4 && b2 && k || a6 && b4 && b2 && k || b6 && a4 && a2 && k ||
      b6 && a6 && k)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return 0;
}
