#include <iostream>
#include <algorithm>
#include <utility>

using namespace std;

int main() {
    pair<int, int> p[6];
    for (int i = 0; i < 6; ++i) {
        cin >> p[i].first >> p[i].second;
        if (p[i].first > p[i].second)
            swap(p[i].first, p[i].second);
    }
    sort(p, p + 6);
    
    if (!(p[0].first == p[1].first && p[0].second == p[1].second)) {
        cout << "no" << endl;
        return 0;
    }
    if (!(p[2].first == p[3].first && p[2].second == p[3].second)) {
        cout << "no" << endl;
        return 0;
    }
    if (!(p[4].first == p[5].first && p[4].second == p[5].second)) {
        cout << "no" << endl;
        return 0;
    }
    
    int a = p[0].first, b = p[0].second, c;
    if (a == p[2].first)
        c = p[2].second;
    else if (a == p[2].second)
        c = p[2].first;
    else {
        cout << "no" << endl;
        return 0;
    }
    
    if (!((p[4].first == b && p[4].second == c) || (p[4].first == c && p[4].second == b)))
        cout << "no" << endl;
    else
        cout << "yes" << endl;
    
    return 0;
}