#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;

void solve(pair<int, int> &a, pair<int, int> &b, pair<int, int> &c);

int main() {
  vector<pair<int, int>> hw(6);
  int i;
  for (i = 0; i < 6; i++) {
    cin >> hw[i].first >> hw[i].second;
    if (hw[i].first > hw[i].second) {
      swap(hw[i].first, hw[i].second);
    }
  }
  sort(hw.begin(), hw.end());
  bool result = true;
  vector<pair<int, int>> p(3);
  for (i = 0; i < 3; i ++) {
    if (!(hw[i * 2] == hw[i * 2 + 1])) {
      result = false;
      goto OUTPUT;
    } else {
      p[i] = hw[i * 2];
    }
  }

  for (i = 1; i < 3; i++) {
    if (p[i].first == p[i].second) {
      swap(p[0], p[i]);
    }
  }
  
  solve(p[0], p[1], p[2]);
  solve(p[1], p[2], p[0]);
  solve(p[2], p[0], p[1]);

  if (p[0] == p[1] && p[1] == p[2] && p[0].first == 0 && p[0].second == 0) {
    result = true;
  } else {
    result = false;
  }

  OUTPUT:
  cout << (result ? "yes" : "no") << endl;

  return 0;
}

void solve(pair<int, int> &a, pair<int, int> &b, pair<int, int> &c) {
  if (a.first == b.first) {
    a.first = 0;
    b.first = 0;
  } else if (a.first == b.second) {
    a.first = 0;
    b.second = 0;
  } else if (a.first == c.first) {
    a.first = 0;
    c.first = 0;
  } else if (a.first == c.second) {
    a.first = 0;
    c.second = 0;
  }
  if (a.second == b.first) {
    a.second = 0;
    b.first = 0;
  } else if (a.second == b.second) {
    a.second = 0;
    b.second = 0;
  } else if (a.second == c.first) {
    a.second = 0;
    c.first = 0;
  } else if (a.second == c.second) {
    a.second = 0;
    c.second = 0;
  }
  return;
}

