cat - | LANG=C sort -k1,1n >  test

tmp1=$(cat test | awk 'NR == 1 {print $1}')
tmp2=$(cat test | awk 'NR == 2 {print $1}')


[ $tmp1 -eq 1 -a $tmp2 -eq 3 ] && echo 2
[ $tmp1 -eq 1 -a $tmp2 -eq 2 ] && echo 3
[ $tmp1 -eq 2 -a $tmp2 -eq 3 ] && echo 1