The present invention relates to compounds of formula (I): in which m, p,Y1 Y2, Y3, R1, R2a, R2b, R3a, R3b, R4a, R4b, R4a and R5b are defined in the claims capable of inhibiting the activity of SHP2. The invention further provides a process for the preparation of compounds of the invention, pharmaceutical preparations comprising such compounds and methods of using such compounds and compositions in the management of diseases or disorders associated with the aberrant activity of SHP2.