upto ordered pairs