#include <stdio.h>
#include <utility>
#include <algorithm>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

int main(void) {
  int i, j, k;
  pair<int, int> p[6];
  rep(i, 6) {
    scanf("%d%d", &p[i].first, &p[i].second);
    int t;
    if(p[i].first > p[i].second) t = p[i].first, p[i].first = p[i].second, p[i].second = t;
  }
  sort(p, p + 6);
  rep(i, 3) {
    if(p[i * 2].first != p[i * 2 + 1].first || p[i * 2].second != p[i * 2 + 1].second) {
      printf("no\n");
      return 0;
    }
  }
  if((p[0].first == p[2].first && p[0].second == p[4].first && p[2].second == p[4].second) || (p[0].first == p[2].second && p[0].second == p[4].first && p[2].first == p[4].second) || (p[0].first == p[2].second && p[0].second == p[4].second && p[2].first == p[4].first) || (p[0].first == p[4].second && p[0].second == p[2].first && p[2].second == p[4].first) || (p[0].first == p[4].second && p[0].second == p[2].second && p[2].first == p[4].first)) printf("yes\n");
  else printf("no\n");
  return 0;
}
