One pixel requires 64 bit = 8 bytes.
So, total no. of pixels = 8MB / 8B = 1M.
Resolution gives the no. of pixels in horizontal as well as vertical direction. Normal screens have aspect ratio 4:3 and wide screens have 16:10. Since aspect ratio is not given, we can assume 1:1 for simplicity.
So, max resolution supported = 1024 * 1024 (√1M = 1024).