#include <bits/stdc++.h>
using namespace std;
int main() {
  map<pair<int, int>, int> counter;
  for (int i = 0; i < 6; ++i) {
    int h, w;
    cin >> h >> w;
    if (h > w) swap(h, w);
    ++counter[pair<int, int>(h, w)];
  }
  if ((int)counter.size() == 1)
    puts("yes");
  else if ((int)counter.size() == 2) {
    vector<pair<int, int> > vec;
    for (auto v : counter) vec.push_back(v.first);
    int mini = counter[vec[0]], maxi = counter[vec[1]];
    if (mini > maxi) swap(mini, maxi);
    if (mini == 2 && maxi == 4)
      puts("yes");
    else
      puts("no");
  } else
    puts("no");
  return 0;
}
