#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)
      for (int k = j + 1; k < 6; ++k) {
        vector<pair<int, int> > vec1;
        vector<pair<int, int> > vec2;
        for (int l = 0; l < 6; ++l) {
          if (l == i || l == j || l == k)
            vec1.push_back(pair<int, int>(h[l], w[l]));
          else
            vec2.push_back(pair<int, int>(h[l], w[l]));
        }
        sort(vec1.begin(), vec1.end());
        sort(vec2.begin(), vec2.end());
        if (vec1 == vec2) {
          puts("yes");
          return 0;
        }
      }
  puts("no");
  return 0;
}
