#include <cstdio>
int main()
{
auto aspect_ratio = 17.0 / 7.0;
int image_width = 400;
int image_height = image_width / aspect_ratio;
auto viewport_height = 2.0;
auto viewport_width = viewport_height * image_width / image_height;
printf("Aspect ratio: %f\n", aspect_ratio);
printf("Image: %d x %d\n", image_width, image_height);
printf("Viewport: %f x %f\n", viewport_width, viewport_height);
return 0;
}
I2luY2x1ZGUgPGNzdGRpbz4KCmludCBtYWluKCkKewogICAgYXV0byBhc3BlY3RfcmF0aW8gPSAxNy4wIC8gNy4wOwogICAgaW50IGltYWdlX3dpZHRoID0gNDAwOwoKICAgIGludCBpbWFnZV9oZWlnaHQgPSBpbWFnZV93aWR0aCAvIGFzcGVjdF9yYXRpbzsKCiAgICBhdXRvIHZpZXdwb3J0X2hlaWdodCA9IDIuMDsKICAgIGF1dG8gdmlld3BvcnRfd2lkdGggPSB2aWV3cG9ydF9oZWlnaHQgKiBpbWFnZV93aWR0aCAvIGltYWdlX2hlaWdodDsKCglwcmludGYoIkFzcGVjdCByYXRpbzogJWZcbiIsIGFzcGVjdF9yYXRpbyk7CiAgICBwcmludGYoIkltYWdlOiAlZCB4ICVkXG4iLCBpbWFnZV93aWR0aCwgaW1hZ2VfaGVpZ2h0KTsKICAgIHByaW50ZigiVmlld3BvcnQ6ICVmIHggJWZcbiIsIHZpZXdwb3J0X3dpZHRoLCB2aWV3cG9ydF9oZWlnaHQpOwoKICAgIHJldHVybiAwOwp9