Responsive ads

I have seen some discussion on getting Adsense working etc but I'm struggling with my code.

I want to show this code on desktop

<ins data-revive-zoneid="18" data-revive-id="82afe82"></ins>
<script async src="//"></script>

And the same code with a different ID on mobile which loads a different size image.

I'm not great at coding so can anyone advise on the code I need to load each script based on screen size? My template is responsive.