#include <bits/stdc++.h>
using namespace std;
int arr[6][2];
int cnt = 0;
int can = 0;
int flg[6][2] = {};
int dfs(int a, int b);
int main() {
  for (int i = 0; i < 6; i++)
    for (int j = 0; j < 2; j++) cin >> arr[i][j];
  dfs(0, 0);
  if (can)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
  return (0);
}
int dfs(int a, int b) {
  int next;
  if (b == 0)
    next = 1;
  else
    next = 0;
  if (cnt == 12) {
    if (arr[a][next] == arr[0][0]) can = 1;
    return (0);
  }
  for (int i = 0; i < 6; i++) {
    for (int j = 0; j < 2 && a != i; j++) {
      if (flg[i][j] == 0 && flg[a][next] == 0 && arr[i][j] == arr[a][next]) {
        flg[a][next] = flg[i][j] = 1;
        cnt += 2;
        dfs(i, j);
        cnt -= 2;
        flg[a][next] = flg[i][j] = 0;
      }
    }
  }
  return (0);
}
