#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <bitset>
using namespace std;

typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define index(xs, x) (int)(lower_bound(all(xs), x) - xs.begin())
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007
P mp(int x, int y) {
  if (x > y) swap(x, y);
  return P(x, y);
}

map<P, int> ctr;
signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  vector<int> xs;
  rep(_, 6) {
    int w, h;
    cin >> w >> h;
    xs.pb(w);
    xs.pb(h);
    ctr[mp(w, h)]++;
  }
  sort(all(xs));
  for (int w : xs) {
    for (int h : xs) {
      for (int l : xs) {
        map<P, int> copy(ctr);
        copy[mp(w, h)]-=2;
        copy[mp(h, l)]-=2;
        copy[mp(l, w)]-=2;
        bool ok = true;
        for (auto p : copy) {
          if (p._2 != 0) ok = false;
        }
        if (ok) {
          cout << "yes\n";
          return 0;
        }
      }
    }
  }
  cout<<"no\n";
  return 0;
}