#include <bits/stdc++.h>
using namespace std;
int main() {
  int h[6], w[6];
  int i, j;
  int check[6] = {};
  for (i = 0; i < 6; i++) {
    cin >> h[i] >> w[i];
  }
  for (i = 0; i < 6; i++) {
    for (j = i + 1; j < 6; j++) {
      if (check[i] == 0 && check[j] == 0) {
        if (h[i] == h[j] && w[i] == w[j]) {
          check[i]++;
          check[j]++;
          break;
        } else if (h[i] == w[j] && w[i] == h[j]) {
          check[i]++;
          check[j]++;
          break;
        }
      }
    }
  }
  int ans = 0;
  for (i = 0; i < 6; i++) {
    if (check[i] == 0) ans++;
  }
  if (ans == 0)
    cout << "yes\n";
  else
    cout << "no\n";
  return 0;
}
