#000141

BubbleTriangle

You are given two triangles A1B1C1 and A2B2C2 in the plane. Is there an
isometric transformation of the plane that maps one triangle onto another,
preserving the order of vertices? If so, what kind of transformation is that?



Input12 integer numbers in one line separated by a space, which
are the coordinates of vertices in the following order: a1x, a1y, b1x, b1y, c1x, c1y, a2x, a2y, b2x, b2y, c2x, c2y.
Vertices of one triangle are not collinear, i.e. triangles do exist. All
coordinates are between -10000 and +10000, inclusive.


OutputOne of the following letters: N, I, T, R, S, O.


Here is the meaning for each letter:
N: there is no isometric transformation mapping one triangle onto another;
I: transformation asked for is the identity transformation;
T: transformation asked for is a translation;
R: transformation asked for is a rotation;
S: transformation asked for is an axial symmetry;
O: transformation asked for is some other isometric transformation.




Input:
1 1 2 2 1 2 5 7 6 8 5 8

Output:
T

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.