All squares are rectangles. Shape X is not a rectangle. Therefore:
Contrapositive: if not a rectangle, then not a square. Shape X is not a rectangle, so it is not a square.