#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> ctr;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  for (int _ = 0; _ < (6); _++) {
    int w, h;
    cin >> w >> h;
    if (w > h) swap(w, h);
    ctr[pair<int, int>(w, h)]++;
  }
  int s = 0;
  for (auto p : ctr) s += p.second / 2;
  if (s >= 3)
    cout << "yes\n";
  else
    cout << "no\n";
  return 0;
}
