#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    vector<pair<int, int>> v(6);
    vector<int> a;
    for (int i = 0; i < 6; ++i) {
        cin >> v[i].first >> v[i].second;
        if(v[i].first > v[i].second) swap(v[i].first, v[i].second);
        a.emplace_back(v[i].first);
        a.emplace_back(v[i].second);
    }
    sort(a.begin(), a.end());
    a.erase(unique(a.begin(), a.end()), a.end());
    if(a.size() >= 4) {
        puts("no");
        return 0;
    }
    sort(v.begin(),v.end());
    for (auto &&i : a) {
        for (auto &&j : a) {
            for (auto &&k : a) {
                vector<pair<int, int>> v2{minmax(i, j), minmax(i, j), minmax(k, j), minmax(k, j), minmax(i, k), minmax(i, k)};
                sort(v2.begin(),v2.end());
                if(v == v2) {
                    puts("yes");
                    return 0;
                }
            }
        }
    }
    puts("no");
    return 0;
}
