awk -F" " '
function check_number(input)
{
  for (i=1 ; i<4; i++) {
    for (j=1; j<4; j++) {
      if (input==n[i","j]) {k[i","j]=1}
    }
  }
}
{
  if (c<3) {
    c++;
    n[c","1] = $1;
    n[c","2] = $2;
    n[c","3] = $3;
  }
  else {
    check_number($1);
  };
}

END {
       if (k[1","1] * k[1","2] * k[1","3] == 1) {print "yes";}
  else if (k[2","1] * k[2","2] * k[2","3] == 1) {print "yes";}
  else if (k[3","1] * k[3","2] * k[3","3] == 1) {print "yes";}
  else if (k[1","1] * k[2","1] * k[3","1] == 1) {print "yes";}
  else if (k[1","2] * k[2","2] * k[3","2] == 1) {print "yes";}
  else if (k[1","3] * k[2","3] * k[3","3] == 1) {print "yes";}
  else if (k[1","1] * k[2","2] * k[3","3] == 1) {print "yes";}
  else if (k[1","3] * k[2","2] * k[3","1] == 1) {print "yes";}
  else {print "no";}  
}
'