https://acmp.ru/index.asp?main=task&id_task=53
n,m=map(int,input().split())
blue=0
green=0
red=0
black=0
for i in range(1,n+1):
for j in range(1,m+1):
if i*j%5==0:
blue+=1
elif i*j%3==0:
green+=1
elif i*j%2==0:
red+=1
else:
black+=1
print(f"RED : {red}")
print(f"GREEN : {green}")
print(f"BLUE : {blue}")
print(f"BLACK : {black}")
n,m=map(int,input().split())
blue=0
green=0
red=0
black=0
for i in range(1,n+1):
for j in range(1,m+1):
if i*j%5==0:
blue+=1
elif i*j%3==0:
green+=1
elif i*j%2==0:
red+=1
else:
black+=1
print(f"RED : {red}")
print(f"GREEN : {green}")
print(f"BLUE : {blue}")
print(f"BLACK : {black}")