find angle XMY.