Under construction

Still being built. Things may change

Fourth Point

Interview

Time limit1sMemory limit128 MB

Summary
Given three corners of an axis-aligned rectangle, compute the coordinates of the missing fourth corner.
Level

Easy2 of 10

Topics
Geometry, Math, Implementation
Solved
No attempts yet

Problem

You are given the coordinates of three points. Add one more point so that the four points are the vertices of a rectangle whose sides are parallel to the coordinate axes. Find the coordinates of that fourth point.

Input

The coordinates of the three points are given, one point per line. Every coordinate is an integer between 1 and 1000, inclusive.

Output

Print the x-coordinate and y-coordinate of the fourth point that completes the rectangle, separated by a space.

Examples2

  1. Example 1

    Input
    5 5
    5 7
    7 5
    
    Expected output
    7 7
    
  2. Example 2

    Input
    30 20
    10 10
    10 20
    
    Expected output
    30 10