Massey products on cycles of projective lines and trigonometric solutions of the Yang-Baxter equations