# How to find the order of a group generated by two elements?

What is the order of a group $G$ generated by two elements $x$ and $y$ subject only to the relations $x^3 = y^2 = (xy)^2 = 1$? List the subgroups of $G$.

Since the above relation is the ‘only’ relation, I presume that the order of $x$ is $3$ and the order of $y$ is $2$. Also y is the inverse of itself, and xy is the inverse of itself. The inverse of $x$ is $x^2$.

I have calculated the elements of the group manually using the given relation.
$$G = \{1, x, x^2,y, xy, x^2y \}$$