#include <bits/stdc++.h>
using namespace std;
int main() {
  int h, w;
  int a[6];
  for (int i = 0; i < 6; i++) {
    cin >> h >> w;
    if (h > w) {
      swap(h, w);
    }
    a[i] = h * 1000 + w;
  }
  sort(a, a + 6);
  for (int i = 0; i < 6; i += 2) {
    if (a[i] != a[i + 1]) {
      cout << "no" << endl;
      return 0;
    }
  }
  cout << "yes" << endl;
  return 0;
}
