#include<cstdio>
#include<iostream>
#include<algorithm>
#include<utility>
#include<vector>
#include<queue>
#include<functional>
#include<map>
#include<set>
#include<cstring>
#include<string>
#include<stack>
#include<math.h>
#include<stdlib.h>
using namespace std;
#define int long long
typedef pair<int, int> pii;
typedef pair<int, pii > piii;
typedef pair<double, double> pdd;
typedef pair<int, char> pic;
typedef priority_queue<pii, vector<pii>, greater<pii> > RPQ;
#define mk make_pair
#define INF (1 << 30)
#define INFL (1ll << 60ll)
#define mod 1000000007

pii t[6];

signed main(){
    for(int i = 0; i < 6; i++){
        int a,b;
        cin >> a >> b;
        if(a < b)swap(a, b);
        t[i] = mk(a, b);
    }
    sort(t, t + 6);
    bool flag = false;
    if(t[0] != t[1]){
        flag = true;
    }
    if(t[2] != t[3]){
        flag = true;
    }
    if(t[4] != t[5]){
        flag = true;
    }

    if(flag){
        cout << "no" << endl;
        return 0;
    }

    if(t[0].first == t[2].first){
        if((t[0].second == t[4].first && t[2].second == t[4].second) || (t[0].second == t[4].second && t[2].second == t[4].first)){
            flag = true;
        }
    }
    if(t[0].first == t[2].second){
        if((t[0].second == t[4].first && t[2].first == t[4].second) || (t[0].second == t[4].second && t[2].first == t[4].first)){
            flag = true;
        }
    }
    if(t[0].second == t[2].first){
        if((t[0].first == t[4].first && t[2].second == t[4].second) || (t[0].first == t[4].second && t[2].second == t[4].first)){
            flag = true;
        }
    }
    if(t[0].second == t[2].second){
        if((t[0].first == t[4].first && t[2].first == t[4].second) || (t[0].first == t[4].second && t[2].first == t[4].first)){
            flag = true;
        }
    }
    if(!flag){
        cout << "no" << endl;
    }
    else {
        cout << "yes" << endl;
    }

    return 0;
}

/*

*/
