Domain and range from ordered pairs