Finding ordered pairs from equations