#include <bits/stdc++.h>
using namespace std;
int h[6], w[6];
int main() {
  for (int i = 0; i < 6; ++i) {
    cin >> h[i] >> w[i];
    if (h[i] > w[i]) swap(h[i], w[i]);
  }
  for (int i = 0; i < 6; ++i)
    for (int j = i + 1; j < 6; ++j) {
      if (h[i] != h[j] || w[i] != w[j]) continue;
      vector<int> hs;
      for (int k = 0; k < 6; ++k)
        if (i != k && j != k) {
          if (w[k] == w[i]) {
            hs.push_back(h[k]);
          } else if (h[k] == w[i]) {
            hs.push_back(w[k]);
          }
        }
      for (int k = 0; k < (int)hs.size(); ++k) {
        vector<pair<int, int> > need;
        need.push_back(pair<int, int>(hs[k], w[i]));
        need.push_back(pair<int, int>(hs[k], w[i]));
        need.push_back(pair<int, int>(hs[k], h[i]));
        need.push_back(pair<int, int>(hs[k], h[i]));
        for (int l = 0; l < (int)need.size(); ++l)
          if (need[l].first > need[l].second)
            swap(need[l].first, need[l].second);
        sort(need.begin(), need.end());
        vector<pair<int, int> > remain;
        for (int l = 0; l < 6; ++l)
          if (l != i && l != j) remain.push_back(pair<int, int>(h[l], w[l]));
        if (need == remain) {
          puts("yes");
          return 0;
        }
      }
    }
  puts("no");
  return 0;
}
