#include <bits/stdc++.h>
using namespace std;
int main() {
  int th, tw;
  int vals[1000000] = {};
  int uv[1000] = {};
  for (int i = 0; i < 6; i++) {
    cin >> th >> tw;
    if (th > tw) swap(th, tw);
    vals[(th - 1) * 1000 + (tw - 1)]++;
    uv[th]++;
    uv[tw]++;
  }
  for (int i = 0; i < 1000; i++) {
    for (int j = 0; j < 1000; j++) {
      if (vals[i * j] % 2) {
        cout << "no" << endl;
        return 0;
      }
    }
    if (uv[i] % 4) {
      cout << "no" << endl;
      return 0;
    }
  }
  cout << "yes" << endl;
  return 0;
}
