sure but you wouldnt know that until you actually calculate iiThat would be the aspect ratio.
eg: 3271x1693 only after trying every number from 1 to 3271 would you know its prime. like I said not a trivial problem
Luckily I found a great online calculator here : https://andrew.hedges.name/experiments/aspect_ratio/ (just enter numbers into w1 and h1)
so I'd never need to work it out for myself.
I tried viewing the source for the page to see how it was done but the formula seems to be in a file called <script type="text/javascript" src="/experiments/aspect_ratio/behaviors.js"></script> but I have no access to it.