#include <bits/stdc++.h>
using namespace std;
int h[6], w[6];
int main() {
  map<int, int> t;
  for (int i = 0; i < 6; i++) {
    cin >> h[i] >> w[i];
    t[h[i]]++;
    t[w[i]]++;
  }
  if (t.size() > 3) {
    puts("no");
    return 0;
  }
  map<int, int> mp;
  for (auto p : t) {
    int cnt = 0;
    for (int i = 0; i < 6; i++) {
      if (h[i] == p.first)
        cnt++;
      else if (w[i] == p.first)
        cnt++;
    }
    mp[cnt]++;
  }
  if (t.size() == 1) puts("yes");
  if (t.size() == 2) {
    auto p1 = *mp.begin(), p2 = *mp.rbegin();
    if ((p1.second == 6 && p2.second == 4) ||
        (p1.second == 4 && p2.second == 6))
      puts("yes");
    else
      puts("no");
  }
  if (t.size() == 3) {
    auto p1 = *mp.begin(), p2 = *++mp.begin(), p3 = *mp.rbegin();
    if (p1.second == 4 && p2.second == 4 && p3.second == 4)
      puts("yes");
    else
      puts("no");
  }
}
