Combine these two statements using, 'if and only if'
p:If a rectangle is a square, then all its four sides are equal.
q:If all the four sides of a rectangle are equal, then the rectangle is a square.
A rectangle is a square, if and only if all its four sides are equal.