#include <bits/stdc++.h>
using namespace std;
int h[6], w[6];
bool check(map<pair<int, int>, int> &mp) {
  for (int i = 0; i < 6; ++i) {
    if (mp[pair<int, int>(h[i], w[i])] < 2) continue;
    set<int> base;
    for (auto v : mp)
      if (v.second) {
        base.insert(v.first.first);
        base.insert(v.first.second);
      }
    for (auto v : base) {
      map<pair<int, int>, int> mp2;
      mp2[pair<int, int>(h[i], w[i])] += 2;
      for (int j = 0; j < 2; ++j) {
        pair<int, int> s = pair<int, int>(h[i], v);
        if (s.first > s.second) swap(s.first, s.second);
        ++mp2[s];
      }
      for (int j = 0; j < 2; ++j) {
        pair<int, int> s = pair<int, int>(w[i], v);
        if (s.first > s.second) swap(s.first, s.second);
        ++mp2[s];
      }
      if (mp2 == mp) return true;
    }
  }
  return false;
}
int main() {
  map<pair<int, int>, int> mp;
  for (int i = 0; i < 6; ++i) {
    cin >> h[i] >> w[i];
    if (h[i] > w[i]) swap(h[i], w[i]);
    ++mp[pair<int, int>(h[i], w[i])];
  }
  puts(check(mp) ? "yes" : "no");
  return 0;
}
