
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <list>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_set>
#include <unordered_map>
#include <array>
#include <cassert>
#include <bitset>
using namespace std;
using LL = long long;

int main(void)
{
	map<pair<int, int>, int>cnt;
	set<int>s;
	for (int i = 0; i < 6; ++i)
	{
		int h, w;
		cin >> h >> w;
		if (h > w)swap(h, w);
		cnt[{h, w}] ++;
		s.insert(h);
		s.insert(w);
	}
	if (s.size() == 3)
	{
		auto itr = s.begin();
		int a = *itr;
		++itr;
		int b = *itr;
		++itr;
		int c = *itr;
		if (cnt[{min(a, b), max(a, b)}] == 2 && cnt[{min(c, b), max(c, b)}] == 2 && cnt[{min(a, c), max(a, c)}] == 2)
		{
			cout << "yes\n";
		}
		else
		{
			cout << "no\n";
		}
	}
	else if (s.size() == 2)
	{
		auto itr = s.begin();
		int a = *itr;
		++itr;
		int b = *itr;
		if (cnt[{min(a, b), max(a, b)}] == 4 && cnt[{a, a}] == 2)
		{
			cout << "yes\n";
		}
		else if (cnt[{min(a, b), max(a, b)}] == 4 && cnt[{b, b}] == 2)
		{
			cout << "yes\n";
		}
		else
		{
			cout << "no\n";
		}
	}
	else if (s.size() == 1)
	{
		auto itr = s.begin();
		int a = *itr;
		if (cnt[{a, a}] == 6)
		{
			cout << "yes\n";
		}
		else
		{
			cout << "no\n";
		}
	}
	else
	{
		cout << "no\n";
	}
	return 0;
}