Maybe a needless addition, but rated caps are marked so on the outside. So you must find one or more of the codes X1, X2, Y1, Y2 labeled on the component somewhere.
Also, Y rated caps tend to be relatively small capacitacnce since leakage current to PE wiring is strictly limited in the code.