Square Deal

Given three rectangles, decide whether they can be glued edge to edge into a square, with rotations allowed.

Medium4GeometryImplementationBrute forceNo attempts yetTime limit2sMemory limit512 MB

Problem

You are given the height and width of three rectangles. Decide whether the three rectangles can be glued together along their edges to form a single square. The three rectangles must cover the square with no gaps, and they must not overlap. A rectangle may be rotated by 90 degrees.

Input

The input consists of three lines. Line jj contains the height HjH_j and the width WjW_j of the jj-th rectangle, separated by a space.

100HjWj1100 \ge H_j \ge W_j \ge 1 and H1H2H3H_1 \ge H_2 \ge H_3.

Output

Print YES on one line if the three rectangles can form a square, and NO otherwise.