Can I use Adsense Ads in my website and Admob Ads in my google app (converted from same website) and coding what Ads to view?

I have an Adsense + Admob accounts, I created a website(Asp.net Framework 4.8, JavaScript on front-end), then I created a google app from my website (web-content), so the website and google app viewing the same contents.
So can I write a code to view the Adsense Ads when visitors open the website,
and view the Admob Ads when visitors open the google app? and is that legal ?
or just I must use one of the them ?

Please advice