#include <bits/stdc++.h>
using namespace std;
int main() {
  int c, b, i, j, z = 0, k = 1, m[1001][1001] = {0}, e[13][2] = {0};
  for (i = 0; i < 6; i++) {
    cin >> b >> c;
    if (b > c)
      m[b][c]++;
    else
      m[c][b]++;
  }
  for (i = 0; i < 1001; i++)
    for (j = 0; j < 1001; j++) {
      if (m[i][j] == 6) {
        e[z][0] = i;
        e[z++][1] = j;
        e[z][0] = i;
        e[z++][1] = j;
        e[z][0] = i;
        e[z++][1] = j;
      } else 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] > 3) k = 0;
  if (k)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
