Let A and B be selfadjoint matrices in M_n(C) such that AB=BA. Prove that there is a unitary matrix U such that U*AU and U*BU are both diagonal matrices.