#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;
double EPS = 1e-8;
int main() {
  map<pair<int, int>, int> m;
  for (int i = (0); i < (int)(6); i++) {
    int a, b;
    cin >> a >> b;
    if (a > b) swap(a, b);
    m[{a, b}]++;
  }
  map<int, int> m2;
  for (auto& p : m)
    if (p.second & 1) {
      cout << "no" << endl;
      return 0;
    } else
      m2[p.first.first]++, m2[p.first.second]++;
  if (m2.size() > 3) {
    cout << "no" << endl;
    return 0;
  }
  vector<int> v;
  for (auto& p : m2)
    if (p.second % 4 != 0) {
      cout << "no" << endl;
      return 0;
    } else
      for (int i = (0); i < (int)(p.second / 4); i++) v.push_back(p.first);
  if (v.size() != 3) {
    cout << "no" << endl;
    return 0;
  }
  int a = v[0], b = v[0], c = v[0];
  if (m.count({a, b}) && m.count({b, c}) && m.count({a, c}))
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
