#include <bits/stdc++.h>
using namespace std;
int main() {
  unordered_map<int, int> U;
  pair<int, int> c[6];
  for (int i = 0; i < 6; i++) {
    int a, b;
    cin >> a >> b;
    U[a]++;
    U[b]++;
    c[i] = pair<int, int>(min(a, b), max(a, b));
  }
  bool s = true;
  sort(c, c + 6);
  if (c[0] != c[1] || c[2] != c[3] || c[4] != c[5]) s = false;
  for (auto t = U.begin(); t != U.end(); t++) {
    if (t->second % 4) s = false;
  }
  if (s)
    puts("yes");
  else
    puts("no");
}
