Company: Amex_7aug
Difficulty: medium
Domino Pyramid Problem Description John found six dominoes. A domino is a rectangular tile with a line dividing its face into two square halves. Each half is marked with a number of spots. John wants to build a three-stage pyramid from these dominoes. The first level should consist of three dominoes, the second level of two dominoes and the highest of one domino. The levels are arranged in such a way that the peak of the pyramid is at the center: that is, each level is positioned over the center of the level below it. There is also an additional condition. The number of spots on each domino half should be the same as the number of spots on the half positioned beneath it. Note that this does not apply to neighboring dominoes on the same level. Is it possible to build a pyramid from these dominoes, as described above? Dominoes can be freely rearranged. We also assume that dominoes can be rotated (that is, the piece [X, Y] can be treated as [X, Y] or [Y, X], where X denotes the number of