I'm stuck on the following problem from Dummit and Foote's Abstract Algebra text (p. 166):
Let $n$ and $m$ be positive integers with $d=(n,m)$. Let $Z_n=\langle x\rangle$ and $Z_m=\langle y \rangle$. Let $A$ be the central product of $\langle x \rangle$ and $\langle y \rangle$ with an element of order $d$ identified, which has presentation $\langle x,y | x^n=y^m=1,xy=yx,x^\frac{n}{d}=y^\frac{m}{d} \rangle$. Describe $A$ as a direct product of two cyclic groups.
My attempt:
Using the formula for the order of the direct product, we have $$|\langle x \rangle * \langle y \rangle|=\frac{nm}{d}.$$ Using the relations, any element of $G:=\langle x \rangle * \langle y \rangle$ can be expressed in the form $x^iy^j$ where $0\leq i<n/d,0 \leq j<m$, or alternatively $0 \leq i <n,0 \leq j <m/d$. We see that all elements are necessary since the order of $G$ equals the product of the lengths of the ranges in both cases. Thus we must have $|x|=n$ and $|y|=m$, for if one of them would have smaller order, we couldn't get $nm/d$ elements in $G$. Now, according to Exercise 5, the exponent of $G$ equals its first invariant factor. Since $\exp(G)=\text{lcm} \{|g|: g \in G \}$, it is divisible by $\text{lcm} \{|x|,|y|\}=\frac{nm}{(n,m)}=\frac{nm}{d}$. Since this gives $n_1=\exp(G) \geq |G|$, we must have $n_1=|G|=\frac{nm}{d}$, and that $G$ is of type $(\frac{nm}{d})$ (i.e. cyclic). We can thus express $G$ as the direct product $Z_{nm/d} \times Z_{1}$.
Is my solution correct? It seems a bit weird that there is only 1 nontrivial factor. (Note that if $n=m=p$ for some prime $p$, it is definitely impossible to have a proper factorisation into two cyclic groups.)
Thank you!