#include <bits/stdc++.h>
using namespace std;
int main() {
  bool j = true;
  int count = 0;
  vector<pair<int, int>> s;
  for (int i = 0; i < 6; i++) {
    int h, w;
    cin >> h >> w;
    if (h > w) {
      swap(h, w);
    }
    s.push_back({h, w});
  }
  sort(s.begin(), s.end());
  vector<pair<int, int>> e;
  for (int i = 0; i < 3; i++) {
    if (s[i * 2] != s[i * 2 + 1]) {
      j = false;
      break;
    }
    bool samef = false;
    bool sames = false;
    for (int t = 0; t < 3; t++) {
      if (t != i && (s[i * 2].first == s[t * 2].second ||
                     s[i * 2].first == s[t * 2].first)) {
        samef = true;
      }
      if (t != i && (s[i * 2].second == s[t * 2].second ||
                     s[i * 2].second == s[t * 2].first)) {
        sames = true;
      }
    }
    if (!samef || !sames) {
      j = false;
      break;
    }
    bool donef = false;
    bool dones = false;
    for (int t = 0; t < e.size(); t++) {
      if (e[t].first == s[i * 2].first) {
        e[t].second++;
        donef = true;
      }
    }
    if (!donef) {
      e.push_back({s[i * 2].first, 1});
    }
    for (int t = 0; t < e.size(); t++) {
      if (e[t].first == s[i * 2].second) {
        e[t].second++;
        dones = true;
      }
    }
    if (!dones) {
      e.push_back({s[i * 2].second, 1});
    }
  }
  for (int i = 0; i < e.size(); i++) {
    if (e[i].second % 2 != 0) {
      j = false;
    }
  }
  cout << (j ? "yes" : "no") << endl;
  return 0;
}
