A Ukrainian mathematician who found the best way to pack spheres in eight dimensions to take up the least space is one of the winners of the Fields medal.

Prof James Maynard from Oxford University and Prof Maryna Viazovska from the cole polytechnique fédérale de Lausanne won the prize.

The first Fields medal was awarded in 1936, but it wasn't awarded again until 1950, when it was presented every four years to up to four mathematicians under the age of 40.

The second woman to receive the award was Viazovska, who was born and grew up in Kyiv. Breast cancer claimed the life of Mirkhanzzai.

One thing Viazovska likes about mathematics is that it is always clear where the truth is.

James Maynard

James Maynard: ‘Prime numbers are like the atoms for mathematicians.’ Photograph: Ryan Cowan

If you are doing an exam in history and someone asks you'so what were the reasons for the French revolution?', how can you tell which answer is correct and which is incorrect? She said that this was very mysterious for her.

Maynard, who is expecting a baby soon, told the Guardian that he learned of his win while he was up a ladder.

I grabbed my phone to see if I messed up the painting or not. He said that had he received an email from the IMU president he would have had a zoom call. I suspected what the email meant when I received it.

His work on the distribution of prime numbers is one of the many contributions Maynard has made.

Maynard said that prime numbers are similar to atoms. You can understand a lot about chemicals by knowing the atoms that make them up, but you can also understand a lot about prime numbers by knowing how multiplication works.

Maynard said it was important to look at the size of the gaps between the numbers. He said that it has been studied for hundreds of years and possibly thousands of years.

Maynard has shown that sometimes prime numbers come close together and sometimes far apart.

Maynard was told by Graville that he must have made a mistake when he discovered that there are three and five pairs of prime numbers. Maynard didn't.

It was a huge shock to hear that. He is not a one horse wonder because James has approached many questions after many.

Viazovska worked with others to solve the problem of the densest way to pack spheres in eight dimensions.

Our daily newsletter is sent out every weekday at 7am.

Sir Walter Raleigh wondered how to work out the number of cannonballs in a pile when he was in England in the 16th century. Thomas Harriot, Raleigh's assistant, began to ponder how spheres could be packed to take up less space. According to Johannes Kepler, the answer was a pyramid pattern. His hypothesis was proved in the past.

Viazovska was able to find the answer in higher dimensions. The solution is easier in dimensions eight and 24.

Maynard told the Guardian that winning the award is a big deal.

He said it felt weird to imagine his name on a list of great mathematicians. I think putting my name on that list feels weird.