#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
using namespace std;

int main()
{
    vector<pair<int, int> > v(6);
    for(int i=0; i<6; ++i)
        cin >> v[i].first >> v[i].second;

    sort(v.begin(), v.end());
    do{
        for(int i=0; i<(1<<6); ++i){
            bitset<32> bs(i);
            vector<pair<int, int> > w = v;
            for(int j=0; j<6; ++j){
                if(bs[j])
                    swap(w[j].first, w[j].second);
            }

            if( w[0].first  == w[1].first  && w[1].first  == w[2].first  && w[2].first  == w[3].first  &&
                w[4].first  == w[5].first  && w[5].first  == w[0].second && w[0].second == w[1].second &&
                w[2].second == w[3].second && w[3].second == w[4].second && w[4].second == w[5].second )
            {
                cout << "yes" << endl;
                return 0;
            }
        }
    }while(next_permutation(v.begin(), v.end()));

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