#include "bits/stdc++.h"

using namespace std;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    set<pair<size_t, size_t>> st;
    map<pair<size_t, size_t>, size_t> cnt;
    for (size_t i = 0; i < 6; ++i) {
        size_t h, w; cin >> h >> w;
        if (h > w) swap(h, w);
        pair<size_t, size_t> p = make_pair(h, w);
        st.insert(p);
        cnt[p]++;
    }

    if (st.size() == 3) {
        vector<size_t> h, w;
        for (auto &si: st) {
            if (cnt[si] != 2) {
                cout << "no" << "\n";
                return 0;
            }
            h.emplace_back(si.first);
            w.emplace_back(si.second);
        }

        vector<size_t> cnt(1010);
        for (size_t i = 0; i < 3; ++i) {
            if (h[i] == w[i]) {
                cout << "no" << "\n";
                return 0;
            }
            cnt[h[i]]++, cnt[w[i]]++;
        }

        for (size_t i = 0; i < 3; ++i) {
            if (cnt[h[i]] != 2 || cnt[w[i]] != 2) {
                cout << "no" << "\n";
                return 0;
            }
        }

        cout << "yes" << "\n";
    }

    else if (st.size() == 2) {
        for (auto &si: st) {
            if (cnt[si] != 2 && cnt[si] != 4) {
                cout << "no" << "\n";
                return 0;
            }
            if (cnt[si] == 2) {
                if (si.first != si.second) {
                    cout << "no" << "\n";
                    return 0;
                }
            }
        }
        cout << "yes" << "\n";
    }

    else if (st.size() == 1) {
        for (auto &si: st) {
            if (si.first != si.second) {
                cout << "no" << "\n";
                return 0;
            }
        }
        cout << "yes" << "\n";
    }

    else {
        cout << "no" << "\n";
    }

    return 0;
}

