Problem:


Score : 100 points

Problem Statement

AtCoDeer has three cards, one red, one green and one blue.

An integer between 1 and 9 (inclusive) is written on each card: r on the red card, g on the green card and b on the blue card.

We will arrange the cards in the order red, green and blue from left to right, and read them as a three-digit integer.

Is this integer a multiple of 4?  

Constraints

1 ≤ r, g, b ≤ 9

Input

Input is given from Standard Input in the following format:

r g b

Output

If the three-digit integer is a multiple of 4, print YES (case-sensitive); otherwise, print NO.

Sample Input 1

4 3 2

Sample Output 1

YES

432 is a multiple of 4, and thus YES should be printed.

Sample Input 2

2 3 4

Sample Output 2

NO

234 is not a multiple of 4, and thus NO should be printed.



Sample input:
4 3 2


Sample output:
YES

Submission status: Runtime Error

Solution code:
import numpy as np
n=input()
n=int(n)
a=input().split()
b=np.zeros(n)
div=0
num_8=0
for i in range(n):
 a[i]=int(a[i])
 if a[i]<=399 and a[i]>=1:
  b[i]=0
 elif a[i]>=400 and a[i]<=799:
  b[i]=1
 elif a[i]>=800 and a[i]<=1199:
  b[i]=2
 elif a[i]>=1200 and a[i]<=1599:
  b[i]=3
 elif a[i]>=1600 and a[i]<=1999:
  b[i]=4
 elif a[i]>=2000 and a[i]<=2399:
  b[i]=5
 elif a[i]>=2400 and a[i]<=2799:
  b[i]=6
 elif a[i]>=2800 and a[i]<=3199:
  b[i]=7
 else:
  b[i]=8
  num_8=num_8+1
for i in range(8):
 if i in b:
  div=div+1
min=div
max=div+num_8
if min==0:
 min=1
print(min,max)

Submission status: Runtime Error

Solution code:
l = map(int, raw_input().split())

r = l[0]*100
g = l[1]*10
b = l[2]

if(r + g + b) % 4 == 0:
  print "YES"
else:
  print "NO"

Submission status: Runtime Error

Solution code:
r = input(int)*100
g = input(int)*10
b = input(int)

if(r + g + b) % 4 == 0:
  print "YES"
else:
  print "NO"

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import random

r = 100*random.randint(1,9)
g = 10*random.randint(1,9)
b = random.randint(1,9)

print r+g+b

if(r + g + b) % 4 == 0:
  print "YES"
else:
  print "NO"

Submission status: Runtime Error

Solution code:
n = input()
s = input()
count = 0
countl = 0
for c in s:
    if c=='(':
        count += 1
    else:
        count -= 1
    if count < 0:
        countl += 1
        count = 0
count = 0
countr = 0
for c in s[::-1]:
    if c=='(':
        count -= 1
    else:
        count += 1
    if count < 0:
        countr += 1  
        count = 0
print('('*countl + s + ')'*countr)

Submission status: Runtime Error

Solution code:
number = int(input())
rate = [int(i) for i in input().split()]


# In[7]:

counter = {}
for r in rate:
    if 1 <= r < 400:
        counter["grey"] = counter.get("grey", 0) + 1
    if 400 <= r < 800:
        counter["brown"] = counter.get("brown", 0) + 1
    if 800 <= r < 1200:
        counter["green"] = counter.get("green", 0) + 1
    if 1200 <= r < 1600:
        counter["sky"] = counter.get("sky", 0) + 1
    if 1600 <= r < 2000:
        counter["blue"] = counter.get("blue", 0) + 1
    if 2000 <= r < 2400:
        counter["yellow"] = counter.get("yellow", 0) + 1
    if 2400 <= r < 2800:
        counter["orange"] = counter.get("orange", 0) + 1
    if 2800 <= r < 3200:
        counter["red"] = counter.get("red", 0) + 1
    if 3200 <= r:
        counter["color"] = counter.get("color", 0) + 1

answer = 0
for k, v in counter.items():
    if not v == 0:
        answer += 1
        
if counter.get("color", 0) == 0:
    print(str(answer) + " " + str(answer))
else:
    if answer == 1:
        print("1 " + str(counter["color"]))
    else:
        print(str(answer-1) + " " + str(answer-1+counter["color"]))

Submission status: Runtime Error

Solution code:
number = int(input())
rate = [int(i) for i in input().split()]


# In[7]:

counter = {}
for r in rate:
    if 1 <= r < 400:
        counter["grey"] = counter.get("grey", 0) + 1
    if 400 <= r < 800:
        counter["brown"] = counter.get("brown", 0) + 1
    if 800 <= r < 1200:
        counter["green"] = counter.get("green", 0) + 1
    if 1200 <= r < 1600:
        counter["sky"] = counter.get("sky", 0) + 1
    if 1600 <= r < 2000:
        counter["blue"] = counter.get("blue", 0) + 1
    if 2000 <= r < 2400:
        counter["yellow"] = counter.get("yellow", 0) + 1
    if 2400 <= r < 2800:
        counter["orange"] = counter.get("orange", 0) + 1
    if 2800 <= r < 3200:
        counter["red"] = counter.get("red", 0) + 1
    if 3200 <= r:
        counter["color"] = counter.get("color", 0) + 1

answer = 0
for k, v in counter.items():
    if not v == 0:
        answer += 1
        
if counter.get("color", 0) == 0:
    if answer == 1:
        print("1 " + str(counter["colors"]))
    else:
        print(str(answer) + " " + str(answer))
else:
    print(str(answer-1) + " " + str(answer-1+counter["color"]))

Submission status: Runtime Error

Solution code:
import sys


if __name__ == "__main__":
    N = int(input())

    rates = [map(int, raw_input().split()) for i in range(N)]
    # tasks = np.array(tasks)
    normal_colors = int(3200/400)
    colors = [None] * normal_colors
    any = 0
    for rate in rates:
        if rate >= 3200:
            any +=1
        else:
            colors[rate/400] = 1
    print(sum(colors), sum(colors)+any)

Submission status: Runtime Error

Solution code:
import re
def kezuru(str):
    if str.find('()') == -1:
        return str
    else:
        return kezuru(str.replace('()',''))

n = input()
str = input()
kezutta = kezuru(str)
#print('(' * len(re.search('\)+',kezutta).group(0)) + str + ')' * len(re.search('\(+',kezutta).group(0)))
n1 = 0
m1 = re.search('\)+',kezutta)
if m1:
    n1 = len(m1.group(0))
n2 = 0
m2 = re.search('\(+',kezutta)
if m2:
    n2 = len(m2.group(0))
print(n1 * '(' + str + n2 * ')')

Submission status: Runtime Error

Solution code:
import re
input()
strorig = input()
closeFirst = re.search('^\)*',strorig).group(0)
openLast = re.search('\(*$',strorig).group(0)
strModified = '(' * len(list(closeFirst)) + strorig + ')' * len(list(openLast))
nums = [-1 if i == '(' else 1 for i in list(strModified)]
sumnums = sum(nums)
if sumnums < 0:
    result = strModified + ')' * (-1 * sumnums)
else:
    result = '(' * sumnums + strModified
print(result)

Submission status: Runtime Error

Solution code:
N=input()
def waru(num):
    return int(num)//400
a = list(map(waru, input().split()))
b = []
num = 0
for i in a:
    if i >= 8:
        b.append(i)
minu = len(set(a)) - len(set(b))
if min==0:
    min = 1

print(minu, len(b)+minu)

Submission status: Runtime Error

Solution code:
N=input()
def waru(num):
    return int(num)//400
    
a = list(map(waru, input().split()))
num = 0
for i in a:
    num+=1 if i >= 8 else 0
min = len(set(a))-num+1

print(min, num+min)

Submission status: Runtime Error

Solution code:
x = input().split()

y = x[0] + x[1] + x[2]

if y % 4 == 0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
N=input()
brac = raw_input()
ans = brac

while '()' in brac:
	brac=brac.replace('()','')

left=brac.count('(')
right=brac.count(')')

print '('*right +ans +')'*left

Submission status: Runtime Error

Solution code:
n = input()
houses = map(lambda x: int(x), raw_input().split())
houses = sorted(list(set(houses)))
print houses[-1] - houses[0]

Submission status: Runtime Error

Solution code:
raw = raw_input().split(" ")
num = int(raw[0]) * 100 + int(raw[1]) * 10 + int(raw[2])
if not (num % 4):
    return 'YES'
else:
    return 'NO'

Submission status: Runtime Error

Solution code:
raw = raw_input().split(" ")
num = raw[0] * 100 + raw[1] * 10 + raw[2]
if not (num % 4):
  return "Yes"
return "No"

Submission status: Runtime Error

Solution code:
raw = raw_input().sprit(" ")
if not raw % 4:
    return "Yes"
return "No"

Submission status: Runtime Error

Solution code:
raw = raw_input()
if raw %= 4:
    return "Yes"
return "No"

Submission status: Runtime Error

Solution code:

N=int(input())

a=[int(i) for i in input().split()]

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles>=8 :
    print(eight," ",eight)
elif alles+len(color)>=8 :
    if alles>=len(color) :
        print(alles," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if alles>=len(color) :
        print(alles," ",len(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()

output = ''

start = 0
end = 0
for i in S:
    if i == '(':
        if end > 0:
            output = '(' * end + output
            output += ')' * end
            end = 0
            start += 1
            output += i
        else:
            start += 1
            output += i
    else:
        if start > 0:
            start -= 1
            output += i
        else:
            end += 1

for i in range(start):
    output += ')'

for i in range(end):
    output += ')'

output = '(' * end + output

print(output)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
head = ""
depth = 0
for i in s:
    if i == "(":
        depth += 1
    else:
        if depth == 0:
            head += "("
        else:
            depth -= 1
tail = "".join([")" for _ in range(depth)])
print(head + s + tail)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
head = ""
depth = 0
for i in s:
    if i == "(":
        depth += 1
    else:
        if depth == 0:
            head += "("
        else:
            depth -= 1
tail = "".join([")" for _ in range(depth)])
print(head + s + tail)

Submission status: Runtime Error

Solution code:
N = int(raw_input())
S = raw_input()
t = S

print
print S
while S.count("()") != 0:
    S = S.replace("()", "")
    print S

L = S.count("(")
R = S.count(")")
print L, R

print "("*R+t+")"*L

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys

args = sys.argv
num = args[1] * 100 + args[2] * 10 + args[3]
if num % 4 == 0:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys

args = sys.argv
num = int(args.split())
if num % 4 == 0:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
r=int(input())
g=int(input())
b=int(input())
 
x=int(r*100+g*10+b)
if(x%4==0):
    print('YES')
else:
    print("NO")

Submission status: Runtime Error

Solution code:
r=input()
g=input()
b=input()

x=int(r*100+g*10+b)
if(x%4==0):
    print('YES')
else:
    print("NO")

Submission status: Runtime Error

Solution code:
from sys import stdin
n = int(stdin.readline())
a  = map(int,stdin.readline().split())
ans = set()
co = 0
for i in a:
 if i < 3200:
  ans.add(i/400)
 else:
  co += 1
print  max(1,len(ans)),len(ans) + co

Submission status: Runtime Error

Solution code:
N = int(input())
data = input().split()

output = int(max(data)) - int(min(data))
print(output)

Submission status: Runtime Error

Solution code:
input(); print((lambda xs: max(xs) - min(xs))([int(x) for x in input().split()]))

Submission status: Runtime Error

Solution code:
if (b * 10 + c) % 4 == 0:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
print("YES" if int("".join(input())) % 4 == 0 else "NO)

Submission status: Runtime Error

Solution code:
from collections import Counter
input()
c = Counter([min(int(i)//400,8) for i in input().split()])
lt3200 = [bool(c[i]) for i in range(8)].count(True)
print(max(1, lt3200), lt3200+c[8])

Submission status: Runtime Error

Solution code:
l=[0]*13
input()
for i in input().split():;l[int(i)//400]+=1
r=sum([1 for a in l[:8] if a > 0])
print(max(1,r),r+sum(l[8:]))

Submission status: Runtime Error

Solution code:
N=int(input())
a=map(int,input().split())

num=[0,0,0,0,0,0,0,0,0]
counter=0

for i in a:
    if 1<=i and i<=399:
        num[0]+=1
    elif 400 <= i and i <= 799:
        num[1] += 1
    elif 800 <= i and i <= 1199:
        num[2] += 1
    elif 1200 <= i and i <= 1599:
        num[3] += 1
    elif 1600 <= i and i <= 1999:
        num[4] += 1
    elif 2000 <= i and i <= 2399:
        num[5] += 1
    elif 2400 <= i and i <= 2799:
        num[6] += 1
    elif 2800 <= i and i <= 3199:
        num[7] += 1
    elif 3200 <= i:
        num[8] += 1

for i in range(0,8):
    if num[i]!=0:
        counter+=1

if counter==0 and num[8]==0:
    min=0
    max=0

elif counter==0 and num[8]!=0:
    min=1
    max=num[8]

else:
    min=counter
    max=counter+num[8]

#print(num)
print(str(min)+" "+str(max))

Submission status: Runtime Error

Solution code:
N = int(input())
a = list(map(int, input().split()))
gray = 0
brown = 0
green = 0
sky = 0
blue = 0
yellow = 0
orange = 0
red = 0
god = 0
for i in range(N-1):
    if a[i] < 400:
        gray = True
    elif a[i] < 800:
        brown = True
    elif a[i] < 1200:
        green = True
    elif a[i] < 1600:
        sky = True
    elif a[i] < 2000:
        blue = True
    elif a[i] < 2400:
        yellow = True
    elif a[i] < 2800:
        orange = True
    elif a[i] < 3200:
        red = True
    else:
        god+=1
if god > 0:
    color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red) + god + 1
    color_min = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red) + 1
else:
    color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red)
    color_min = color_max
if color_max>8:
    print(color_min, "8")
else:
    print(color_min, color_max)

Submission status: Runtime Error

Solution code:
def main():
    # not use N
    _ = int(input().strip())

    n_399 = 0
    n_799 = 0
    n_1199 = 0
    n_1599 = 0
    n_1999 = 0
    n_2399 = 0
    n_2799 = 0
    n_3199 = 0
    n_free = 0
    rates = list(map(int, input().strip().split()))
    for r in rates:
        if r <= 399:
            n_399 = 1
        elif r <= 799:
            n_799 = 1
        elif r <= 1199:
            n_1199 = 1
        elif r <= 1599:
            n_1599 = 1
        elif r <= 1999:
            n_1999 = 1
        elif r <= 2399:
            n_2399 = 1
        elif r <= 2799:
            n_2799 = 1
        elif r <= 3199:
            n_3199 = 1
        else:
            n_free += 1

    n_min = n_399 + n_799 + n_1199 + n_1599 + n_1999 + n_2399 + n_2799 + n_3199
    if n_min == 0 and n_free > 0:
        n_min = 1

    if n_min + n_free >= 8:
        n_max = 8
    else:
        n_max = n_min + n_free

    print(n_min, n_max)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N = int(input())
a = list(map(int, input().split()))
gray = 0
brown = 0
green = 0
sky = 0
blue = 0
yellow = 0
orange = 0
red = 0
god = int(0)
for i in range(N-1):
    if a[i] < 400:
        gray = True
    elif a[i] < 800:
        brown = True
    elif a[i] < 1200:
        green = True
    elif a[i] < 1600:
        sky = True
    elif a[i] < 2000:
        blue = True
    elif a[i] < 2400:
        yellow = True
    elif a[i] < 2800:
        orange = True
    elif a[i] < 3200:
        red = True
    else:
        god+=1
if god > 0:
    color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red) + god
    color_min = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red) + 1
else:
    color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red)
    color_min = color_max
print(color_max, color_min)

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(a[len(a)-1]-a[0])

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

N = int(input())
a = list(map(int, input().split()))

print(max(a) - min(a))

Submission status: Runtime Error

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

a.sort()
color = []
other = 0
for i in a:
    if i < 400 * 1:
        color.append('1')
    elif i < 400 * 2:
        color.append('2')
    elif i < 400 * 3:
        color.append('3')
    elif i < 400 * 4:
        color.append('4')
    elif i < 400 * 5:
        color.append('5')
    elif i < 400 * 6:
        color.append('6')
    elif i < 400 * 7:
        color.append('7')
    elif i < 400 * 8:
        color.append('8')
    else:
        other += 1
max_ans = len(set(color)) + other
min_ans = len(set(color))
if min_ans == 0 and other != 0:
    min_ans = 1
print(min_ans, max_ans)

Submission status: Runtime Error

Solution code:
def main():

    s = raw_input().split(" ")
    s = int(s[0]*100) + int(s[1]*10) + int(s[2])

    if s%4==0:
        print("YES")
    else:
        print("NO")

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Aug 28 21:42:33 2016

@author: you
"""

n = int(input())
a = list(map(int, input().split()))
a.sort()
colornum = 0
colorflag = [0,0,0,0,0,0,0,0]
rainbow = 0
maxvalue = 0
minvalue = 0
for i in range(n):
    if colorflag[0] == 0 and a[i] < 400:
        colornum = colornum + 1
        colorflag[0] = 1
    elif colorflag[1] == 0 and a[i] >= 400 and a[i] < 800:
        colornum = colornum + 1
        colorflag[1] = 1
    elif colorflag[2] == 0 and a[i] >= 800 and a[i] < 1200:
        colornum = colornum + 1
        colorflag[2] = 1
    elif colorflag[3] == 0 and a[i] >= 1200 and a[i] < 1600:
        colornum = colornum + 1
        colorflag[3] = 1
    elif colorflag[4] == 0 and a[i] >= 1600 and a[i] < 2000:
        colornum = colornum + 1
        colorflag[4] = 1
    elif colorflag[5] == 0 and a[i] >= 2000 and a[i] < 2400:
        colornum = colornum + 1
        colorflag[5] = 1
    elif colorflag[6] == 0 and a[i] >= 2400 and a[i] < 2800:
        colornum = colornum + 1
        colorflag[6] = 1
    elif colorflag[7] == 0 and a[i] >= 2800 and a[i] < 3200:
        colornum = colornum + 1
        colorflag[7] = 1
    elif a[i] >= 3200:
        rainbow = rainbow + 1
for j in range(8):
    if colorflag[j] == 1:
        minvalue = minvalue + 1
maxvalue = minvalue + rainbow
if minvalue == 0:
    minvalue = 1
    maxvalue = rainbow
print(minvalue,maxvalue)

Submission status: Runtime Error

Solution code:
N = input()
a = map(int, raw_input().split())
a.sort()
print a[-1] - a[0]

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(int(i) for i in input().split())

hai = 0
tya = 0
midori = 0
mizu = 0
ao = 0
ki = 0
daidai = 0
aka = 0

niji = 0

mincolor = 0
maxcolor = 0

for i in range(n):
    if 1 <= a[i] and a[i] <=399:
        hai = 1
    elif 400 <= a[i] and a[i] <= 799:
        tya = 1
    elif 800 <= a[i] and a[i] <= 1199:
        midori = 1
    elif 1200 <= a[i] and a[i] <=1599:
        mizu = 1
    elif 1600 <= a[i] and a[i] <= 1999:
        ao = 1
    elif 2000 <= a[i] and a[i] <= 2399:
        ki = 1
    elif 2400 <= a[i] and a[i] <=2799:
        daidai = 1
    elif 2800 <= a[i] and a[i] <= 3199:
        aka = 1
    elif 3200 <= a[i]:
        niji += 1

mincolor = hai + tya + midori + mizu + ao + ki + daidai + aka
maxcolor = mincolor + niji

if maxcolor >= 9:
    maxcolor = 8

print(mincolor, maxcolor)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(int(i) for i in input().split())

hai = 0
tya = 0
midori = 0
mizu = 0
ao = 0
ki = 0
daidai = 0
aka = 0

niji = 0

mincolor = 0
maxcolor = 0

for i in range(n):
    if 1 <= a[i] and a[i] <=399:
        hai = 1
    elif 400 <= a[i] and a[i] <= 799:
        tya = 1
    elif 800 <= a[i] and a[i] <= 1199:
        midori = 1
    elif 1200 <= a[i] and a[i] <=1599:
        mizu = 1
    elif 1600 <= a[i] and a[i] <= 1999:
        ao = 1
    elif 2000 <= a[i] and a[i] <= 2399:
        ki = 1
    elif 2400 <= a[i] and a[i] <=2799:
        daidai = 1
    elif 2800 <= a[i] and a[i] <= 3199:
        aka = 1
    elif 3200 <= a[i]:
        niji += 1

mincolor = hai + tya + midori + mizu + ao + ki + daidai + aka
maxcolor = mincolor

for i in range(niji):
    maxcolor += 1

if maxcolor >= 9:
    maxcolor = 8

print(mincolor, maxcolor)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
col = [0 for i in range(n)]
cnt = 0
for i in range(n):
    if 1 <= a[i] <=399:
        col[i] = "b"
    elif 400<= a[i]<=799:
        col[i] = "c"
    elif 800<= a[i]<=1199:
        col[i] = "d"
    elif 1200<= a[i]<=1599:
        col[i] = "e"
    elif 1600<= a[i]<=1999:
        col[i] = "f"
    elif 2000<= a[i]<=2399:
        col[i] = "g"
    elif 2400<= a[i]<=2799:
        col[i] = "h"
    elif 2800<= a[i]<=3199:
        col[i] = "j"
    else:
        col[i] = "k"
        cnt += 1
colv = list(set(col))
mn =mx = len(colv)
if "k" in colv:
        mn -=1
        mx += cnt-1
        if mn == 0:
            mn =1
        
print(str(mn)+" "+str(mx))

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(int(i) for i in input().split())

hai = 0
tya = 0
midori = 0
mizu = 0
ao = 0
ki = 0
daigai = 0
aka = 0

niji = 0

mincolor = 0
maxcolor = 0

for i in range(n):
    if 1 <= a[i] and a[i] <=399:
        hai = 1
    elif 400 <= a[i] and a[i] <= 799:
        tya = 1
    elif 800 <= a[i] and a[i] <= 1199:
        midori
    elif 1200 <= a[i] and a[i] <=1599:
        mizu = 1
    elif 1600 <= a[i] and a[i] <= 1999:
        ao = 1
    elif 2000 <= a[i] and a[i] <= 2399:
        ki = 1
    elif 2400 <= a[i] and a[i] <=2799:
        daidai = 1
    elif 2800 <= a[i] and a[i] <= 3199:
        aka = 1
    elif 3200 <= a[i]:
        niji += 1

mincolor = hai + tya + midori + mizu + ao + ki + daidai + aka
maxcolor = mincolor

for i in range(niji):
    maxcolor += 1

if maxcolor >= 9:
    maxcolor = 8

print(mincolor, maxcolor)

Submission status: Runtime Error

Solution code:
N=int(input())
a_n=[]
a2_n=[]
a_n = input().split(" ")
count = 0

for i in range(N):
    if int(a_n[i])%400 < 8:
         a2_n.append(int(a_n[i])%400)
    else:
        count += 1

n_min = len(set(a2_n))
if n_min+count >= 8:
    n_max=8
else:
    n_max = n_min+count

print(str(n_min)+" "+str(n_max))

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Here your code !

n = int(input())
a = input().split()
a_int = sorted(list(map(int,a )))
print(a_int)
max_a = max(a_int)

col = [0,0,0,0,0,0,0,0]
all_col = 0 

for i in range(len(a_int)):
    if a_int[i] < 400:
        col[0] += 1
    elif a_int[i] < 800:
        col[1] += 1
    elif a_int[i] < 1200:
        col[2] += 1
    elif a_int[i] < 1600:
        col[3] += 1
    elif a_int[i] < 2000:
        col[4] += 1
    elif a_int[i] < 2400:
        col[5] += 1
    elif a_int[i] < 2800:
        col[6] += 1
    elif a_int[i] < 3200:
        col[7] += 1
    else:
        all_col += 1

min_c = len(list(filter((lambda x: x > 0), col)))
max_c = min_c + all_col
if max_c > 8:
    max_c -= max_c -8
print(str(min_c)+'  ' +str(max_c))

Submission status: Runtime Error

Solution code:
print("YES"*(int(input()[::2])%4<1)or"NO")

Submission status: Runtime Error

Solution code:

inf=float('inf')
N = int(input())
x = list(map(int, input().split()))
a=[0]*8
b=0
for i in range(0,N):
    if x[i]>=3200:
        b +=1
for j in range(0,8):
    for i in range(0,N):
        if x[i]<400:
            a[j] +=1
            x[i] = inf
        x[i] -= 400

zerox=0
mincolar=0
 
for i in a:
    if i==0:
        zerox +=1  
    else:
        mincolar +=1

if(zerox<b):
    print(mincolar,mincolar+zerox)
else:
    print(mincolar,mincolar+b)


quit()

Submission status: Runtime Error

Solution code:
N = int(input())
x = list(map(int, input().split()))
a=[0]*8
b=0
for i in range(0,N):
    if x[i]>=3200:
        b +=1
for j in range(0,8):
    for i in range(0,N):
        if x[i]<400:
            a[j] +=1
            x[i] = inf
        x[i] -= 400

zerox=0
mincolar=0
 
for i in a:
    if i==0:
        zerox +=1  
    else:
        mincolar +=1

if(zerox<b):
    print(mincolar,mincolar+zerox)
else:
    print(mincolar,mincolar+b)


quit()

Submission status: Runtime Error

Solution code:
N = int(input())
A = input().split()
b = [0]*8
c = 0

for a in A:
    a = int(a)
    if 1<=a<=399:
        b[0] += 1
    elif 400<=a<=799:
        b[1] += 1
    elif 800<=a<=1199:
        b[2] += 1
    elif 1200<=a<=1599:
        b[3] += 1
    elif 1600<=a<=1999:
        b[4] += 1
    elif 2000<=a<=2399:
        b[5] += 1
    elif 2400<=a<=2799:
        b[6] += 1
    elif 2800<=a<=3199:
        b[7] += 1
    elif 3200<=a:
        c += 1

if c == 0:
    print(8-b.count(0), end=" ")
else:
    print(max(8-b.count(0),1), end=" ")

print(min(8-b.count(0)+c, 9))

Submission status: Runtime Error

Solution code:
r,g,b = map( int, raw_input().split(" "))
number = 100* r + 10+ g + b

if number %4 == 0:
    print "YES"
else
    print "NO"

Submission status: Runtime Error

Solution code:
# coding: utf-8
def get_ln_inputs():
    return input().split()


def get_ln_int_inputs():
    return list(map(int, get_ln_inputs()))


def main():
    get_ln_inputs()
    rates = get_ln_int_inputs()

    colors = list()
    for _ in range(8):
        colors.append(0)

    free_colors = 0
    for rate in rates:
        if rate >= 3200:
            free_colors += 1
        else:
            colors[rate // 400] = 1
    fixed_colors = sum(colors)

    print(str(fixed_colors) + " " + str(fixed_colors + free_colors))


main()

Submission status: Runtime Error

Solution code:
n = int(input())
A = list(map(int, input().split()))
B = set()
C = []
for i in A:
    if 1<= i <= 399:
        B.add("grey")
    elif 400 <= i <= 799:
        B.add("brown")
    elif 800 <= i <= 1199:
        B.add("green")
    elif 1200 <= i <= 1599:
        B.add("sky")
    elif 1600 <= i <= 1999:
        B.add("blue")
    elif 2000 <= i <= 2399:
        B.add("yellow")
    elif 2400 <= i <= 2700:
        B.add("orange")
    elif 2800 <= i <= 3199:
        B.add("red")
    else:
        C.append("X")

if C:
    S = len(B)
    if S == 0:
        S = 1
    T = len(B) + len (C)
    if T > 8:
        T = 8
    print(str(S) + " " + str(T))
else:
    print(str(len(B)) + " " + str(len(B)))

Submission status: Runtime Error

Solution code:
import math

ranks = [False for i in range(8)]
highs = 0
n = int(input())
inps = [int(i) for i in input().split()]
highs = min(len([i for i in inps if i > 3199]), 8)
inps = [i for i in inps if i <= 3199]
for i in inps:
    ranks[math.floor(i/399)] = True

lows = len([i for i in ranks if i == True]) 

minimum = max(lows, 1)
maximum = lows + highs

print(minimum, maximum)

Submission status: Runtime Error

Solution code:
number = int(input().split())
if (number[1] * 10 + number [2]) % 4 == 0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
N = int(raw_input())
a = map(int, raw_input().split())
mx = max(a)
mn = min(a)
print mx - mn

Submission status: Runtime Error

Solution code:
 r,g,b = input().split(" ")

if (int(r)*100+int(g)*10+int(b))%4==0 :
    print("YES")
else :
    print("NO")

Submission status: Runtime Error

Solution code:
a= input().split(' ')
b = a[0]+a[1]+a[2]
if int(b) % 4 == 0:
    print('YES')
else:
    print('NO'

Submission status: Runtime Error

Solution code:
nums=input()
nums=nums.replace(" ","")
nums=nums.replace(nums[0],"")
nums=int(nums)
if nums%4==0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
r, g, b = map(int, raw_input().split())
num = r * 100 + g * 10 + b
if(num % 4 == 0):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
number = int(input().split())
if (number[1] * 10 + number [2]) % 4 == 0:
    print(YES)
else:
    print(NO)

Submission status: Runtime Error

Solution code:
a, b, c = = map(int, raw_input().split())
if (a * 100 + b * 10 + c) % 4 == 0:
    print "yes"
else:
    print "no"

Submission status: Runtime Error

Solution code:
    r,g,b=map(int,raw_input().split(' '))
     
    if (r*100+g*10+b)%4==0:
      print "YES"
    else:
      print "NO"

Submission status: Runtime Error

Solution code:

r, g, b = list(map(int, input()))
a = r*100+g*10+b

if a % 4 == 0:
    print('Yes')
else:
    print('No')