A triangular prism has two equilateral triangle faces and three square faces. Each vertex of the prism is labeled with an integer from $1$ through $6$, with each integer being used once, in such a way that the sum of the four numbers on the vertices of a square face is the same for each of the three square faces. Arrangements that can be obtained from each other through rotations of the prism are considered to be the same. How many different arrangements are possible?