Take look at a map of Turkey and you’ll have to agree: It’s a curiously box-shaped country. “Why?” is the wrong question. Like most international borders, Turkey’s are the result of geopolitical accident, not of aesthetic or geometric design. A more pertinent query: How rectangular is Turkey? Is it, perhaps, the most rectangular country in the world?

To answer that question, you’d have to find a dataset that minutely describes the borders of all countries on Earth and devise an algorithm that compares each country’s shape to an optimum rectangle with the same area.

That’s exactly what Australian geo-statistician David Barry did. His conclusion: Turkey is only the 15th most rectangular country in the world. The winner: Egypt.

Inevitably, one esoteric geographical question led to its opposite: What is the roundest country in the world? That one was answered by Gonzalo Ciruelos, an Argentinian mathematician. The top of that ranking is Sierra Leone.

As the winners in both categories indicate, Africa is a continent of great diversity in geopolitical morphology. But the most curious country in either ranking is … the Vatican. As it turns out, the Papal State is both the fourth roundest and the second most rectangular country in the world. How is that possible?

First, let’s have a closer look at the results. In Barry’s definition, “optimum rectangularity” is the maximum percentage overlap of a country with a rectangle of the same area.

He’s the first to admit that his algorithm may be inadequate for some countries with complex shapes (“Italy looks like the biggest country that might be wrong”), scattered geographies (e.g. Norway, because it includes Bouvet Island, a Norwegian dependency located between South Africa and Antarctica, freakishly far from the motherland), or locations on either side of the 180° longitude meridian (New Zealand, United States, Russia).

Also, the Natural Earth database includes small dependencies such as Scarborough Reef as separate entries, which somewhat distorts a per-country ranking. (Scarborough Reef is a shoal in the South China Sea disputed between China, Taiwan, and the Philippines. In April 2012, the Chinese Navy prevented their Philippine counterparts from apprehending a number of Chinese fishing vessels off Scarborough Reef (known in Chinese as Huangyan Dao). Since that incident, de facto control over the reef has passed from the Philippines to China—straining both relations between the Philippines and China, and between the Philippines and the United States, which did not act to defend the territorial claim of its ally.) Still, here goes:

Cutting through empty deserts, Egypt’s eastern and southern borders are completely straight—the Bir Tawil Trapezoid (quite possibly the only officially ungoverned territory on Earth, outside Antarctica) is a notable but statistically insignificant exception. Combined with a fairly straight Mediterranean coastline in the north and its only slightly slanted Red Sea shore in the east, Egypt gets a “rectangularity” score of 0.955 (out of 1), and the first place.

The Vatican’s actual borders are a lot more varied than this boxy rendition—perhaps because the database wasn’t built to reflect the delineation of the world’s smallest state in the greatest possible detail. That may explain why the geopolitical headquarters of the Catholic Church manages to rank second in this list.

Smallness and concurrent lack of detail may explain the high score of Sint-Maarten, one of the Dutch dependencies in the Caribbean, but not of Lesotho—a much bigger enclave state inside South Africa—nor Yemen. Currently torn by a vicious civil war, the latter country may yet dissolve back into North and South Yemen, as was the case until 1990. Its constituent parts would likely tumble far down the global rectangularity rankings, perhaps the most trivial effect of such a separation.

Still rating higher than 0.9 on the rectangularity scale are Ghana and Ivory Coast in Africa, and in Europe Macedonia and Poland—indeed also one of those preternaturally “boxy”-looking countries. The tiny Pacific island nation of Nauru, for its part, is another one of those countries that looks rectangular by lack of detail in the database.

Sudan lost its southern third in an independence referendum in 2011. As the emptiest of consolations, it gained in rectangularity. (South Sudan is infamous as one of the world’s data holes, but not for the aforementioned researchers: The world’s youngest nation is the 63rd roundest and 89th most rectangular country in the world.) It now ranks 11th in the world. Rating 0.916, Eswatini (since April 19, 2018, the name for Swaziland) loses out by a small margin from its near neighbor Lesotho. Uruguay is the highest Latin American entry.

Both the United Kingdom and the United Sstates are down toward the bottom of the ranking, by the way. The United Kingdom (rating 0.763) is down in 159th place. Largely due to the eccentricity of Alaska (and Hawaiʻi), the United States (rating 0.735) is only the 169th most rectangular country in the world.

Taking a look at the other ranking, Sierra Leone (rating: 0.934) leads the world in national roundness—despite also being the world’s 14th most rectangular country. It’s a nose-length ahead of Nauru (0.923), which is also the world’s 10th most rectangular country.

Zimbabwe (0.915) might have finished first, if it weren’t for the Hwange region in Matabeleland, jutting out of the country’s circle of Optimal Rotundity. The Southern African country is also the world’s 30th most rectangular country, by the way.

As mentioned earlier, the fourth-roundest country is the Vatican, the world’s second most rectangular country. The fifth-roundest country: Poland … ninth place in the other ranking.

So what does this teach us? Little of any practical value, except this: The fact that the Vatican scores pretty high on both lists has nothing to do with divine intervention. Contrary to common sense, countries can be both very rotund and very rectangular at the same time.

And funnily enough, it’s also the same countries that are both the least round and rectangular: on 208th and last place, the Maldives are the world’s least rectangular country, followed by the Marshall Islands (207). That same Pacific archipelago is also the world’s least round country, with the Maldives trailing just four places behind.

Roundness methodology and maps can be found on Ciruelos’s web page, and the rectangularity maps Barry’s page.