Five complete strangers with seemingly no connection to one another wake up to find themselves trapped inside a bizarre, labyrinthine structure made up of interconnected cube-shaped rooms. The group includes a seasoned police officer, a cynical criminal, a brilliant mathematics student, a cynical corporate architect, and an autistic savant. As they attempt to navigate the shifting rooms, they discover that many chambers are rigged with lethal, highly sophisticated hidden traps. Working together, the group must decipher prime-number mathematical clues hidden on the doorways to survive the deadly maze and uncover the terrifying conspiracy behind their imprisonment.