#include <stdio.h>
int main(){

  int h[6],w[6],i,j,blank,a=0;

  for(i = 0; i < 6; i++){

    scanf("%d %d",&h[i],&w[i]);
    if(h[i] > w[i]){

      blank=h[i];
      h[i]=w[i];
      w[i]=blank;

    }

  }

  for(i = 0; i < 5; i++){

    for(j = 0; j < 5; j++){

      if(h[j] > h[j+1]){

        blank=h[j];
        h[j]=h[j+1];
        h[j+1]=blank;

        blank=w[j];
        w[j]=w[j+1];
        w[j+1]=blank;

      }

      if(h[j] == h[j+1] && w[j] > w[j+1]){

        blank=w[j];
        w[j]=w[j+1];
        w[j+1]=blank;

      }

    }

  }

  //for(i = 0; i < 6; i++) printf("%d %d\n",h[i],w[i]);

  for(i = 0; i < 6; i += 2){

    if(h[i] != h[i+1]) a++;
    if(w[i] != w[i+1]) a++;

  }

  if(a != 0){

    printf("no\n");

    return 0;

  }

  if(h[0] == h[2] && w[0] == h[4] && w[2] == w[4]) printf("yes\n");
  else printf("no\n");

  return 0;

}