We are asked: Given twelve lengths, determine if we can form a rectangular parallelepiped using them. That means we need to partition the twelve sticks into groups of four equal lengths each, for the three dimensions: there should be three distinct lengths (maybe same if cube) each appearing exactly four times. Actually rectangular parallelepiped: It has 12 edges: four edges of length A, four of length B, four of length C. So we need exactly four sticks of each of three lengths. However, could there be other possibilities? For example, if we have eight sticks of one length and four of another? That would correspond to a shape where some edges share same length but not exactly four each? Let's think: In a rectangular parallelepiped, there are three sets of parallel edges. Each set has 4 edges of equal length. So the multiset of edge lengths must consist of exactly three values, each with multiplicity 4. So the condition is: there exist three numbers a, b, c (maybe equal) such that the input multiset is exactly four of each a, b, c. In other words, after counting frequencies, we must have exactly three distinct lengths, each with count 4. Or, could there be only two distinct lengths? If a=b≠c, then we would have a and b same, so effectively two distinct values but counts: a appears 8 times? Actually if a=b, then we have four edges of length a (from group A) and four edges of length b (from group B) but a=b, so they merge: there would be eight edges of length a, and four edges of length c. That would not match a rectangular parallelepiped because we need three groups of four equal edges. However, if a=b, the shape would be such that two dimensions are equal, so it's still a rectangular parallelepiped (actually a rectangular prism with square faces? Wait: If a=b, then we have four edges in x-direction of length a, four edges in y-direction of length a, and four edges in z-direction of length c. That is a valid rectangular parallelepiped (a cuboid with a square base). But the edge lengths: there are 8 edges of length a? Check: In a rectangular prism with dimensions a, a, c. The edges: There are four vertical edges? Actually typical rectangular prism: three dimensions: length, width, height. Edges: 4 edges of length L, 4 edges of width W, 4 edges of height H. If L=W, then there are 4 edges of length L (horizontal front/back and bottom/top? Actually let's label: Let's say length = a, width = b, height = c. Then edges: 4 edges of length a (along length direction), 4 edges of length b (along width direction), 4 edges of length c (along height direction). If a=b, then we have 4 edges of length a and 4 edges of length b (=a) but they are distinct sets of edges. The multiset of edge lengths would contain 8 edges of length a (since 4+4=8) and 4 edges of length c. But the problem says we have 12 sticks. We need to assign each stick to an edge. If we have only sticks lengths: we need to assign 12 sticks. If we have 8 sticks of length a and 4 of length c, we could assign the 8 length-a sticks to both the length and width groups (4 each), and the 4 length-c sticks to height. That would form a rectangular prism with dimensions a, a, c. But wait: The problem statement says: "This time I will make a box with sticks, but I would like to see if I can make a rectangular parallelepiped using the 12 sticks I prepared. However, the stick must not be cut or broken." So we have exactly 12 sticks, each representing an edge. We want to see if we can arrange them into a rectangular parallelepiped (rectangular prism). That requires that there exist three groups of four sticks each of equal length, corresponding to the three edge lengths. But if a=b, then two groups have the same length, but we still need four sticks for each group. However, the sticks themselves are indistinguishable except for length. So if we have 8 sticks of length a, we can allocate any four of them to group A and the remaining four to group B. That would satisfy the requirement: group A length a, group B length a, group C length c. But the condition of "three groups of four equal lengths" would be: we need three values (maybe repeated) but the multiset of lengths must be such that it can be partitioned into three sets of four equal sticks. That is equivalent to: after sorting, there must be exactly 3 distinct lengths? Not necessarily: if there are only 2 distinct lengths, say eight a and four c, we can still partition into three sets: two sets of a and one set of c. But are there exactly three groups? Yes, we can group four a as group1, four a as group2, and four c as group3. That's valid. But is there a requirement that the three groups correspond to three distinct dimensions? They can be equal. The problem says: "However, since a cube is a kind of rectangular parallelepiped, 'yes' is output even if it is a cube." So cube is allowed: all lengths equal, i.e., 12 sticks same length. That would be a case of only one distinct length but can be grouped into three groups of four (all same). So we must allow groups to have same length. So the condition is: can we partition the multiset of 12 lengths into three (unordered) groups each of size 4, such that within each group all lengths are equal. In other words, each group is a set of four sticks of the same length. This is equivalent to: for each length value, its count must be a multiple of 4? Not exactly. Because we have three groups, each of size 4. Let the groups have lengths x, y, z (each possibly equal). Then the total multiset consists of four copies of x, four copies of y, and four copies of z. So the multiset must be exactly a combination of three values (not necessarily distinct) with total counts 4 each. That means the overall counts must satisfy that the sum of counts is 12, and there exists some assignment such that each count is 4? But if we have counts of values, we need to allocate them to groups. For example, if we have 8 of length a and 4 of length b, we can think of that as having two groups of a and one group of b. So the multiset is {a,a,a,a,a,a,a,a,b,b,b,b}. This matches the pattern of (a repeated 4 times, a repeated 4 times, b repeated 4 times) i.e., three groups: two of a, one of b. So the condition is: the multiset of lengths can be represented as the union of three (not necessarily distinct) sets of four equal sticks. Another way: after counting frequencies of each distinct length, we need to see if we can write the list of frequencies as a sum of three terms each being a multiple of 4? Actually each group contributes 4 sticks of some length L. So if we let n_i be the count of sticks of length L_i, then we need to find three groups (with lengths possibly repeated) such that the total usage of each length equals n_i. This is like: we need to assign each of the three groups a length value (say g1, g2, g3), possibly equal, and for each distinct length L, the number of groups assigned length L must equal n_i/4. Because each group assigned that length uses 4 sticks. So for each length L, n_i must be divisible by 4? Not necessarily: if a length appears in multiple groups, the total usage is 4 times the number of groups assigned that length. So n_i must be a multiple of 4. But wait, if we have 8 of a, then n_a=8 which is divisible by 4, and we could assign 2 groups to a (24=8). Similarly, n_b=4 which is divisible by 4, assign 1 group to b. So indeed each n_i must be divisible by 4. However, what about the case of 12 identical sticks? Then n_a=12, divisible by 4, assign 3 groups to a (34=12). So condition: each distinct length's count must be a multiple of 4. But is that sufficient? Let's test with some examples: Input: 1 1 2 2 3 1 2 3 3 3 1 2. Counts: 1 appears 4? Actually list: 1,1,2,2,3,1,2,3,3,3,1,2. Count 1's: positions: 1,2,6,11 => 4 ones. 2's: 3,4,7,12 => 4 twos. 3's: 5,8,9,10 => 4 threes. All multiples of 4. So yes. Output yes.
Second example: 1 1 3 4 8 9 7 3 4 5 5 5. Counts: let's compute: 1:2, 3:2, 4:2, 5:3, 7:1, 8:1, 9:1. Not all multiples of 4. So no.
But is the condition "every count is a multiple of 4" both necessary and sufficient? Let's consider edge cases. Suppose we have lengths: 1 appears 8, 2 appears 4. That's 8 and 4 both multiples of 4, so condition says yes. Is it possible to make a rectangular parallelepiped? Yes: group 1: four 1's, group 2: four 1's, group 3: four 2's. That yields dimensions: two dimensions are 1, one dimension is 2. That is a valid rectangular prism. So yes.
What about 1 appears 4, 2 appears 4, 3 appears 4? yes.
What about 1 appears 12? yes (cube).
What about 1 appears 4, 2 appears 8? yes (dimensions: 1,2,2? Actually that would be one group of 1, two groups of 2 -> dimensions 1,2,2 -> rectangular prism with two equal dimensions).
What about 1 appears 4, 2 appears 4, 3 appears 2, 4 appears 2? Then counts: 4,4,2,2. Here not all are multiples of 4; 2 and 2 are not. Could we still form three groups of four equal sticks? The total number of sticks is 12, we need three groups. If we have 4 ones, 4 twos, 2 threes, 2 fours. Could we assign groups: one group of ones, one group of twos, and the third group must be four sticks all equal. But we only have threes and fours, each only two. So we cannot make a group of four equal sticks from the remaining 4 sticks because they are two 3s and two 4s. Could we mix? No, each group requires all sticks equal. So not possible. So condition holds.
What about more complex scenario: 1 appears 4, 2 appears 4, 3 appears 4? fine.
But consider: 1 appears 8, 2 appears 2, 3 appears 2? Total 12. 8 divisible by 4, 2 and 2 not. Not possible.
But is there a scenario where counts are multiples of 4 but still impossible? For instance, suppose we have only two distinct lengths, one with count 4, another with count 8. That's okay. Suppose we have three distinct lengths, each with count 4? That's okay. Suppose we have four distinct lengths: counts: 4,4,4,0? Actually four distinct lengths would require at least one count not multiple of 4? If we have four distinct lengths, each count must be at least 1 and sum to 12. For all to be multiples of 4, possible counts: 4,4,4,0 (but zero not present). Or 4,4,2,2 (not multiples of 4). Or 4,8,0,0 but that's effectively two lengths. So with four distinct lengths, it's impossible to have each count a multiple of 4 because the sum of multiples of 4 (positive) would be at least 4+4+4+4=16 >12. So can't have more than three distinct lengths if all counts multiples of 4 and total 12. Actually the maximum distinct lengths with each count at least 4 is floor(12/4)=3. So if all counts are multiples of 4, the only possibilities are: one length count 12; two lengths counts (4,8) or (8,4) or (12,0) but zero not present; three lengths counts (4,4,4). All these are valid. So condition is indeed necessary and sufficient: check if each length appears a multiple of 4 times. Because any distribution of 12 sticks with each count divisible by 4 can be partitioned into groups of 4 equal sticks (simply take for each length, divide its sticks into groups of 4; total number of groups will sum to total sticks/4 = 3). Since total sticks = 12, total groups = 3. If all counts are multiples of 4, then the sum of (count_i / 4) over i equals 3. Because sum(count_i)=12, divide by 4 gives 3. So the number of groups from each length is count_i/4, and the sum of those numbers is exactly 3. So we can assign exactly three groups: each group corresponds to a length. That yields a valid rectangular prism: we have three groups (some groups may have same length), each group of four sticks. So condition is: all frequencies of lengths are divisible by 4, and sum of frequencies is 12 (which it is). Equivalent: after counting, we can have at most 3 distinct lengths, each count divisible by 4. But we can also just check if every count is divisible by 4. That automatically ensures sum/4 = integer and the number of groups is integer.
But wait: what if there is a length with count 0? Not relevant.
Thus solution: read 12 integers, count frequencies, then check if all counts are multiples of 4. If yes, output "yes", else "no".
But let's double-check: is there any other shape that could be considered a rectangular parallelepiped that doesn't require exactly four edges per dimension? No, by definition a rectangular parallelepiped has three sets of parallel edges, each set containing 4 edges of equal length. So the condition is correct.
Thus simple program.
Edge cases: Input could have duplicate lengths. Use map/dictionary.
Implementation: Python.
Pseudo:
def solve():
sticks = list(map(int, input().split()))
from collections import Counter
freq = Counter(sticks)
for v in freq.values():
if v % 4 != 0:
print("no")
return
print("yes")
But careful: what if there are more than 12 numbers? The problem says exactly 12 numbers. So we trust that.
Check examples: first example: freq includes values not multiple of 4 => no. Second: all 4 => yes.
What about case: 1 1 1 1 2 2 2 2 3 3 3 3 => yes.
Case: 1 1 1 1 1 1 1 1 2 2 2 2 => yes.
Case: 1 1 1 1 2 2 2 2 2 2 2 2 => counts: 1:4, 2:8 => both divisible by 4 => yes.
Case: 1 1 1 1 2 2 2 2 3 3 3 1? That's 1:5,2:4,3:3 => not all divisible => no.
Thus solution is straightforward.
But wait: Is there any scenario where frequencies are multiples of 4 but we cannot make a rectangular parallelepiped because the lengths cannot be assigned to three dimensions in a way that forms a valid rectangular solid? Actually any assignment of three lengths (possibly equal) yields a rectangular parallelepiped, as long as we have three groups of four equal sticks. There's no further constraint about triangle inequality or positivity; all lengths positive. So it's fine.
Thus answer.
But the problem might be from some contest and some participants may have thought need exactly three distinct lengths. But statement says cube is allowed, so not.
Thus implement.
Now produce final answer: Python code with solve() reading input, counting, checking modulo 4.
We should consider that input may have trailing spaces. Use split.
Also output lowercase yes/no exactly as specified.
We'll write as a full program.
Now I'll write final answer.
```python
import sys
from collections import Counter
def main() -> None:
data = sys.stdin.read().strip().split()
if not data:
return
sticks = list(map(int, data))
freq = Counter(sticks)
for cnt in freq.values():
if cnt % 4 != 0:
print("no")
return
print("yes")
if name == "main":
main()