awk '{$3="!=";n=$1}n==n*$2{$3="="}$0=$3'