Suppose we are given spaces $X$ and $Y$. If they have the same homology groups (i.e. $H_i(X,\mathbb{Z})=H_i(Y,\mathbb{Z})$), then by universal coefficient theorem $$0\to\mathrm{Ext}^1(H_{n-1}(C_\bullet),\mathbb{Z})\to H^n(C_\bullet;\mathbb{Z})\to\mathrm{Hom}(H_n(C_\bullet),\mathbb{Z})\to0$$ tells us that all their cohomology are the same.
My question is the converse, if two spaces have the same cohomology groups, are their homology groups the same? By the same theorem, if both $X,Y$ have bounded homology groups then yes, but I cannot proceed. Any proof or disproof is welcome.