A group of five persons find themselves without knowing how in a sort of superstructure composed of cubical rooms each possessing an exit on each face. All socially differents, Leaven, Helen Holloway, David Worth, Quentin and Rennes have to work totality together to attempt to exit this labyrinth, certainly alien origin, strewn by deadly traps.
From cube to cube in search of a possible exit, Rennes, the king of the escape perishes by the acid while he penetrates in a cube besides. It is necessary at all costs that prisoners understand why they are here, is it because of their jod, their wishes that has gathered them in this labyrinth. Leaven, a brilliant student in mathematics discovers that the rooms having premier numbers indicate a trapped one.
So moving, they discover a new person, a mental paraplegic named Kazan. Rapidly the theory of numbers first collapses when Quentin, the policeman, faces death with one of these traps. The reconstituted team unmasks Worth. The former did not dare to tell it, but he has conceived the external shell of this giant trap, a cube. But he does not know who is behind all that and never knew his employer.
Leaven succeed to understand that the giant cube is composed of 26 rooms large, representing a total of 17576 rooms with primary colors. She understands that figures of the rooms represent cartesian marks that indicates their position in the cube. Seven rooms far from the edge, the team is obliged to cross one in the most complete silence to be able to continue their trip.
Finally they arrive to the shell. The opening of the last wears gives on an immense empties. Helen Holloway uses a manufactured cord with the help of their clothes to swing to the exterior in search of an exit. But Quentin, becoming a real completely mad psychopath let her fall in the void.
Later, they notice that they have turned round when they meets the body of Rennes. This brings them to the conclusion that rooms are turning, what would explain the strange noises they sometimes heard. By the game of permutations, Leaven knows mathematically how to find the exit of this giant combination bolt...
Spoiler ! the end of the story is revealed below…
Trapped coins can be marked thanks to the power of premiere numbers, that's to say it is impossible for mental calculation to realize. To the great surprise of all, Kazan is the only who can archieve to calculate factors of premiere numbers. All now understand why they need each others.
Worth and Leaven abandon Quentin, who becomes a real sanguinary madman, while a permutation of rooms make them lose contact with Kazan. At the end of long efforts, they finally arrive to the bridge that leads to the exit. But it was without the furious return of Quentin who kills Leaven and hurts Worth before dying while he tries to leave the cube during a new room permutation. Kazan will be the only to escape from the labyrinth while Worth remains convict forever.