Both products are built on the XRM framework and work with Dynamics 365. They work in all environments online, hosted, or on premise. They reside wherever Dynamics 365 (CRM) resides.