Problem

Source: 2022 South Russian Girls MO - Assara Juniors p2

Tags: number theory, perfect cube



There are $2022$ natural numbers written in a row. Product of any two adjacent numbers is a perfect cube. Prove that the product of the two extremes is also a perfect cube.