#include <bits/stdc++.h>
using namespace std;
__attribute__((constructor)) void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
int main() {
  map<pair<int, int>, int> mp;
  for (int i = 0; i < 6; i++) {
    int a, b;
    cin >> a >> b;
    if (a > b)
      mp[pair<int, int>(b, a)]++;
    else
      mp[pair<int, int>(a, b)]++;
  }
  if (mp.size() > 3) {
    cout << "no" << endl;
    return 0;
  }
  if (mp.size() == 1) {
    map<pair<int, int>, int>::iterator it = mp.begin();
    if (it->first.first == it->first.second)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
    return 0;
  }
  vector<pair<int, int> > v;
  for (map<pair<int, int>, int>::iterator it = mp.begin(); it != mp.end();
       it++) {
    if (it->first.second == 2 || it->first.second == 4) {
      v.push_back(pair<int, int>(it->first.first, it->first.second));
    } else {
      cout << "no" << endl;
      return 0;
    }
  }
  if (v.size() == 2) {
    if (v[0].first == v[0].second) {
      if (v[0].first == v[1].first || v[0].first == v[1].second)
        cout << "yes" << endl;
      else
        cout << "no" << endl;
      return 0;
    } else if (v[1].first == v[1].second) {
      if (v[1].first == v[0].first || v[1].first == v[0].second)
        cout << "yes" << endl;
      else
        cout << "no" << endl;
      return 0;
    } else {
      cout << "no" << endl;
    }
  } else if (v.size() == 3) {
    if (v[0].first == v[1].first) {
      if (v[0].second == v[2].first) {
        if (v[1].second == v[2].second)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      } else if (v[0].second == v[2].second) {
        if (v[1].second == v[2].first)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      } else {
        cout << "no" << endl;
      }
    } else if (v[0].first == v[1].second) {
      if (v[0].second == v[2].first) {
        if (v[1].first == v[2].second)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      } else if (v[0].second == v[2].second) {
        if (v[1].first == v[2].first)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      } else {
        cout << "no" << endl;
      }
    } else if (v[0].first == v[2].first) {
      if (v[0].second == v[1].first) {
        if (v[2].second == v[1].second)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      } else if (v[0].second == v[1].second) {
        if (v[2].second == v[1].first)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      } else {
        cout << "no" << endl;
      }
    } else if (v[0].first == v[2].second) {
      if (v[0].second == v[1].first) {
        if (v[2].first == v[1].second)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      } else if (v[0].second == v[1].second) {
        if (v[2].first == v[1].first)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      } else {
        cout << "no" << endl;
      }
    }
  }
}
