I know that, unlike the case of the fundamental group (where $\pi_1(X \vee Y) \cong \pi_1(X)\ast \pi_1(Y)$ at least for CW complexes, which are the spaces I care about for the purpose of this question), there is no straightforward formula for the higher homotopy groups of a wedge sum of spaces.
However, I was wondering whether in the case that $\pi_k(X) = \pi_k(Y) = 0$ for all $k \geq 2$ one can deduce that also $\pi_k(X\vee Y) = 0$ for all $k \geq 2$. If this is true, how can one show this? I don't necessarily need a full solution, a hint to get started would be enough.
Thanks in advance!