#include <bits/stdc++.h>
using namespace std;

int main() {
    int h[7],w[7];
    int hantei1=0,hantei2=0,hantei3=0;
    int cnt1=0,cnt2=0,cnt3=0;
    int test1=0,test2=0,test3=0;
    bool flg = true;
    int sqrcnt=0;
    
    long long temp=0;

    for (int i=1 ; i<=6 ;i++) {
        cin >> h[i] >> w[i];

        if (h[i] == w[i]) sqrcnt++;


        if ((test1 != h[i] && test2 != h[i] && test3 != h[i]) &&
            (test1 != 0 && test2 != 0 && test3 != 0)
        ) {
            flg =false;
        }
        else {
            if (test1 == 0) {
                test1 = h[i];
            } else if (test2 == 0 && test1 != h[i]) {
                test2 = h[i];
            } else if (test3 == 0 && test1 != h[i] && test2 != h[i]) {
                test3 = h[i];
            }
        }

        if ((test1 != w[i] && test2 != w[i] && test3 != w[i]) && 
            (test1 != 0 && test2 != 0 && test3 != 0)
        ) {
            flg =false;
        }
        else {
            if (test1 == 0) {
                test1 = w[i];
            } else if (test2 == 0 && test1 != w[i]) {
                test2 = w[i];
            } else if (test3 == 0 && test1 != w[i] && test2 != w[i]) {
                test3 = w[i];
            }
        }


        temp = pow(h[i],2) + pow(w[i], 2);

        if (hantei1 == temp) cnt1++;
        else if (hantei2 == temp) cnt2++;
        else if (hantei3 == temp) cnt3++;
        else {
        if (hantei1 == 0) {
            hantei1 = temp;
            cnt1++;
        }
        else if (hantei2 == 0) {
            hantei2 = temp;
            cnt2++;
        }
        else if (hantei3 == 0) {
            hantei3 = temp;
            cnt3++;
        }

        }

    }

    if (sqrcnt >= 2 && test3 != 0) {
        flg = false;
    } else if (test3 == 0 && sqrcnt < 2) {
        flg = false;
    }
    else if (sqrcnt >= 4 && test3 != 0 && test2 != 0) {
        flg = false;
    }

    if ((cnt1 % 2 ==0 && cnt2 % 2 ==0 && cnt3 % 2 ==0) && flg) {
        cout << "yes" << endl;
    } else {
        cout << "no" << endl;
    }

    

    return 0;
}

