Multilayered piezomagnetic/piezoelectric composite with periodic interface cracks under magnetic or electric field