How subscrive to event on add/delete relation

Hello.
For my goal of automation, I need get event when add/delete relation between two classes.
How can I do?
It will be nice like form trigger for classes.