#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[1001][1001] = {};
  int h[6], w[6], flag[2], ye = 0, fo = 0;
  for (int i = 0; i < 6; i++) {
    cin >> h[i] >> w[i];
    if (h[i] < w[i]) swap(h[i], w[i]);
    a[h[i]][w[i]]++;
    if (a[h[i]][w[i]] == 4) {
      flag[0] = h[i];
      flag[1] = w[i];
      fo++;
    }
  }
  int j = 0, j2 = 0;
  int ans[2][2];
  if (fo == 1) {
    for (int i = 0; i < 6; i++) {
      if (h[i] == flag[0] && w[i] == flag[1] && j < 4)
        j++;
      else {
        ans[j2][0] = h[i];
        ans[j2][1] = w[i];
        j2++;
      }
    }
    if (ans[0][0] > ans[1][0]) swap(ans[0][0], ans[1][0]);
    if (ans[1][0] > ans[1][1]) swap(ans[1][0], ans[1][1]);
    if (ans[0][0] == ans[1][0] && ans[0][1] == ans[1][1]) {
      if (ans[0][0] == flag[0] && ans[0][1] == flag[0]) ye++;
      if (ans[0][0] == flag[1] && ans[0][1] == flag[1]) ye++;
    }
  }
  if (ye == 0)
    cout << "no" << endl;
  else
    cout << "yes" << endl;
  return (0);
}
