gets.to_i.times{puts 'select count(*) from point where %s<=x and x<=%s and %s<=y and y<=%s;'%gets.split}