Problem:


  MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});

棒で作る直方体

  アイヅ放送協会の教育番組(ＡＨＫ教育)では、子ども向けの工作番組「あそんでつくろ」を放送しています。今回は棒で箱を作る回ですが、用意した１２本の棒を使って直方体ができるかを確かめたいと思います。ただし、棒は切ったり折ったりしてはいけません。

１２本の棒の長さが与えられるので、それらすべてを辺とする直方体が作れるかどうか判定するプログラムを作成せよ。

Input

  入力は以下の形式で与えられる。

e1 e2 ... e12

  入力は１行からなり、各棒の長さを表す整数 ei (1 ≤ ei ≤ 100) が与えられる。

Output

直方体を作成できる場合には「yes」を、作成できない場合には「no」を出力する。ただし、立方体は直方体の一種なので、立方体の場合でも「yes」と出力する。

Sample Input 1

1 1 3 4 8 9 7 3 4 5 5 5

Sample Output 1

no

Sample Input 2

1 1 2 2 3 1 2 3 3 3 1 2

Sample Output 2

yes



Sample input:
1 1 3 4 8 9 7 3 4 5 5 5


Sample output:
no

Submission status: Wrong Answer

Solution code:
e = list(map(int, input().split()))
print("yes" if len(set(e[:4])) == len(set(e[4:8])) == len(set(e[8:])) == 1 else "no")

Submission status: Wrong Answer

Solution code:
li = list(map(int,input().split()))
so = sorted(li)
a = so[0]
b = so[4]
c = so[8]
res = False
for n in so[:4]:
    res = a==n
for n in so[4:8]:
    res = b==n
for n in so[8:]:
    res = c==n
print(res)

Submission status: Wrong Answer

Solution code:
li = list(map(int,input().split()))
so = sorted(li)
a = so[0]
b = so[4]
c = so[8]
res = False
for n in so[:4]:
    res = res and a==n
for n in so[4:8]:
    res = res and b==n
for n in so[8:]:
    res = res and c==n
print(res)

Submission status: Wrong Answer

Solution code:
li = list(map(int,input().split()))
so = sorted(li)
a = so[0]
b = so[4]
c = so[8]
for n in so[:4]:
    res1=  a==n
for n in so[4:8]:
    res2=  b==n
for n in so[8:]:
    res3= c==n
print(res1 and res3 and res2)

Submission status: Wrong Answer

Solution code:
li = list(map(int,input().split()))
so = sorted(li)
a = so[0]
b = so[4]
c = so[8]
for n in so[:4]:
    res1=  a==n
for n in so[4:8]:
    res2=  b==n
for n in so[8:]:
    res3= c==n
res = 'yes' if res1 and res3 and res2 else 'no'

Submission status: Accepted

Solution code:
e = list(map(int, input().split()))
e.sort()

frag = True
for i in range(1, 4):
    if e[0] != e[i]:
        frag = False
        break
for i in range(5, 8):
    if e[4] != e[i]:
        frag = False
        break
for i in range(9, 12):
    if e[8] != e[i]:
        frag = False
        break

print("yes" if frag else "no")

Submission status: Accepted

Solution code:
a=[0]*100
b=list(map(int,input().split()))
for i in range(12):
    a[b[i]-1]+=1
c=0
for i in range(100):
    if a[i] and a[i]%4==0: c+=a[i]//4
print('yes' if c==3 else 'no')

Submission status: Accepted

Solution code:
e= sorted(list(map(int, input().split())))
print("yes" if len(set(e[:4]))==len(set(e[4:8]))==len(set(e[8:]))==1 else "no")

Submission status: Accepted

Solution code:
ls = list(map(int, input().split()))
ls.sort()
if ls[0]==ls[1]==ls[2]==ls[3] and ls[4]==ls[5]==ls[6]==ls[7] and ls[8]==ls[9]==ls[10]==ls[11]:
    print('yes')
else:
    print('no')

Submission status: Accepted

Solution code:
l=list(input().split())
l.sort()
if l[0]==l[1]==l[2]==l[3] and l[4]==l[5]==l[6]==l[7]and l[8]==l[9]==l[10]==l[11]:
  print('yes')
else:
   print('no')

Submission status: Accepted

Solution code:
e = sorted(map(int, input().split()))
print("yes" if len(set(e[:4])) == len(set(e[4:8])) == len(set(e[8:])) == 1 else "no")

Submission status: Accepted

Solution code:
a = sorted(map(int,input().split()))
print("yes" if a[0] == a[3] and a[4] == a[7] and a[8] == a[11] else "no")

Submission status: Accepted

Solution code:
lst = sorted(map(int, input().split()))
if lst[0] == lst[3] and lst[4] == lst[7] and lst[8] == lst[11]:
  print("yes")
else:
  print("no")

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
so = sorted(li)
a = so[0]
b = so[4]
c = so[8]
for n in so[:4]:
    res1=  a==n
for n in so[4:8]:
    res2=  b==n
for n in so[8:]:
    res3= c==n
res = 'yes' if res1 and res3 and res2 else 'no'
print(res)

Submission status: Accepted

Solution code:
#標準入力
l = list(map(int,input().split()))

#リストを小さい順に並べる
l.sort()

#4辺を1人組とし、1組の辺が全て同じであれば"yes"でなければ"no"を出力する
if l[0] == l[1] == l[2] == l[3] and l[4] == l[5] == l[6] == l[7] and l[8] == l[9] == l[10] == l[11]:print("yes")
else:print("no")

Submission status: Accepted

Solution code:
data = list(map(int, input().split()))

data.sort()

ans = "yes"
for i in range(0, 12, 4) :
    if data[i] != data[i+1] or data[i] != data[i+2] or data[i] != data[i+3] :
        ans = "no"

print(ans)

Submission status: Accepted

Solution code:

a = [int(i) for i in input().split()]
a.sort()
if a[0] == a[1] and a[1] == a[2] and a[2] == a[3] and a[4] == a[5] and a[5] == a[6] and a[6] == a[7] and a[8] == a[9] and a[9] == a[10] and a[10] == a[11]:
    print("yes")
else:
    print("no")

Submission status: Accepted

Solution code:
e = sorted(map(int, input().split()))
print("yes" if e[0] == e[3] and e[4] == e[7] and e[8] == e[11] else "no")

Submission status: Accepted

Solution code:
x = input().split()
print('yes' if all([x.count(x[i]) % 4 == 0 for i in range(len(x))]) else 'no')

Submission status: Runtime Error

Solution code:
ls = list(map(int, input().split()))
ls.sort()
if ls[0]==ls[1]==ls[2]==ls[3] and ls[4==ls[5]==ls[6]==ls[7] and ls[8]==ls[9]==ls[10]==ls[11]:
    print('yes')
else:
    print('no')

Submission status: Runtime Error

Solution code:
lst=list(input().split())
lst.sort()
if lst[0]==lst[1]==lst[2]==lst[3] and lst[4]==lst[5]==lst[6]==lst[7] and
lst[8]==lst[9]==lst[10]==lst[11]:
  print('yes')
else:
   print('no')

Submission status: Runtime Error

Solution code:
lst=list(input().split())
lst.sort()
if lst[0]==lst[1]==lst[2]==lst[3]andlst[4]==lst[5]==lst[6]==lst[7]andlst[8]==lst[9]==lst[10]==lst[11]:

  print('yes')
else:
   print('no')