#include <iostream>
#include <fstream>
#include <stdio.h>
#include <cstdlib>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <math.h>
#include <random>
#include <time.h>
#include <cassert>
using namespace std;

int main(){
    
    pair<int, int> men[6];
    for(int i=0; i<6; i++){
        int tmp1, tmp2;
        cin >> tmp1 >> tmp2;
        if(tmp2 < tmp1) swap(tmp1, tmp2);
        men[i] = make_pair(tmp1, tmp2);
    }

    sort(men, men+6);

    if(men[0] != men[1] || men[2] != men[3] || men[4] != men[5]){
        cout << "no" << endl;
        return 0;
    }

    if(men[0].first == men[2].first){
        int tmp1 = men[0].second;
        int tmp2 = men[2].second;
        if(tmp2 < tmp1) swap(tmp1, tmp2);
        if(tmp1 != men[4].first || tmp2 != men[2].second){
            cout << "no" << endl;
            return 0;
        }
    }
    else if(men[0].first == men[4].first){
        int tmp1 = men[0].second;
        int tmp2 = men[4].second;
        if(tmp2 < tmp1) swap(tmp1, tmp2);
        if(tmp1 != men[2].first || tmp2 != men[2].second){
            cout << "no" << endl;
            return 0;
        }
    }
    else{
        cout << "no" << endl;
        return 0;
    }

    cout << "yes" << endl;
    
    return 0;
}
