BEGIN { x = 0 } { if ($3 - x >= 25000 || x == 0 && $3 != 0) { print $1 " " $3 x = $3 } } END { if (x != $3) print $1 " " $3 }