Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
a_int = list(map(int,a))
col = 400
all_col = 0 
c= [0,0,0,0,0,0,0,0]
for i in range(n):
    if a_int[i] > 8 * col:
        all_col += 1
    else:
        ii = int(a_int[i]/col)
        if c[ii] < 1:
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)
max_c = min_c + all_col
if max_c > 8:
    max_c -= max_c -8
print(str(min_c)+' ' +str(max_c))

Fixed submission:
from sys import stdin, stdout
def readLine_int_list():return list(map(int, stdin.readline().split()))


def main():
    n = input()
    a = readLine_int_list()

    c = []
    _c = [] 

    for i in a:
        rank = i//400
        if rank > 7:
           _c.append(rank) 
        else:    
            c.append(rank)
    
    
    p = len(set(c))
    print(max(1,p), p+len(_c))

        
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
a_int = list(map(int,a))
col = 400
all_col = 0 
c= [0,0,0,0,0,0,0,0]
for i in range(n):
    if a_int[i] > max_c * col:
        all_col += 1
    else:
        ii = int(a_int[i]/col)
        if c[ii] < 1:
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)
max_c = min_c + all_col
if max_c > 8:
    max_c -= max_c -8
print(str(min_c)+' ' +str(max_c))

Fixed submission:
from sys import stdin, stdout
def readLine_int_list():return list(map(int, stdin.readline().split()))


def main():
    n = input()
    a = readLine_int_list()

    c = []
    _c = [] 

    for i in a:
        rank = i//400
        if rank > 7:
           _c.append(rank) 
        else:    
            c.append(rank)
    
    
    p = len(set(c))
    print(max(1,p), p+len(_c))

        
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
a_int = list(map(int,a))
col = 400
all_col = 0 
max_c = 8
c= [0,0,0,0,0,0,0,0]
for i in range(n):
    if a_int[i] > max_c * col:
        all_col += 1
    else:
        ii = int(a_int[i]/col)
        if c[ii] < 1:
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)
 
print(str(min_c)+' ' +str(max_c))


Fixed submission:
from sys import stdin, stdout
def readLine_int_list():return list(map(int, stdin.readline().split()))


def main():
    n = input()
    a = readLine_int_list()

    c = []
    _c = [] 

    for i in a:
        rank = i//400
        if rank > 7:
           _c.append(rank) 
        else:    
            c.append(rank)
    
    
    p = len(set(c))
    print(max(1,p), p+len(_c))

        
if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = input().split()
a_int = list(map(int,a)
col = 400
all_col = 0 
max_c = 8
for i in range(n):
    if a_int > max_c * col:
        all_col += 1
    else:
        ii = int(a_int/col)
        if c[ii] < 1
            c[ii] += 1
        
cnt = c.count(1)
min_c = max(cnt, 1)

print(str(min_c)+' ' +str(max_c))

Fixed submission:
from sys import stdin, stdout
def readLine_int_list():return list(map(int, stdin.readline().split()))


def main():
    n = input()
    a = readLine_int_list()

    c = []
    _c = [] 

    for i in a:
        rank = i//400
        if rank > 7:
           _c.append(rank) 
        else:    
            c.append(rank)
    
    
    p = len(set(c))
    print(max(1,p), p+len(_c))

        
if __name__ == "__main__":
    main()