#include<iostream>
using namespace std;

void swap( int& a, int& b )
{
    int temp = a;
    a = b;
    b = temp;
}

void bubbleSort( int* a, int* b, bool judge )
{
    for( int i = 0; i < 6; i++ )
        for( int j = 5; j >= 1 + i; j-- )
        {
            if( a[j] < a[j-1] && judge == 0 )
            {
                swap( a[j], a[j-1] );
                swap( b[j], b[j-1] );
            }
            if( a[j] == a[j-1] && b[j] < b[j-1] && judge == 1 )
                swap( b[j], b[j-1] );
        }
}

int main()
{
    int a[6], b[6], m[1001][1001] = {{}};

    for( int i = 0; i < 6; i++ )
    {
        cin >> a[i] >> b[i];
        if( a[i] > b[i] )
            swap( a[i], b[i] );
        m[a[i]][b[i]]++;
    }

    bubbleSort( a, b, 0 );
    bubbleSort( a, b, 1 );

    int c[7] = {};
    for( int i = 0; i < 1001; i++ )
        for( int j = 0; j < 1001; j++ )
            c[m[i][j]]++;

    bool judge = false;
    int p[1001] = {};
    if( c[2] == 3 )
    {
        if( a[0] == b[0] && a[2] == b[2] && a[4] == b[4] );
        else
        {
            p[a[0]]++; p[b[0]]++;
            p[a[2]]++; p[b[2]]++;
            p[a[5]]++; p[b[5]]++;
            int cnt = 0;
            for( int i = 0; i < 1001; i++ )
                if( p[i] == 2 )
                    cnt++;
            judge = cnt == 3 ? 1 : 0;
        }
        
    }
    else if( c[2] == 1 && c[4] == 1 )
        if( a[0] == b[0] && ( a[0] == a[4] || a[0] == b[4] ) || a[4] == b[4] && ( a[4] == a[0] || a[4] == b[0] ) )
            judge = true;
    else
        if( a[0] == b[0] )
            judge = true;

    if( judge == true )
        cout << "yes" << endl;
    else
        cout << "no" << endl;

    return 0;
}
