#!/usr/bin/python
import sys
tab = []
quad = []
count=0
for i in range(5):
quad.append([])
tab.append([])
for input_line in sys.stdin:
line = input_line.strip().split("\t") # X-coordinate \t Ycoordinate \t Tuple
x = float(line[0]) # x-coordinate
y = float(line[1]) # y-coordinate
count=count+1
if x>=1095000 and x<1117000 and y>=1836000 and y<1856600:
quad[0].append(line[2])
elif x>=1117000 and x<1139000 and y>=1856600 and
y<1877200:
quad[1].append(line[2])
elif x>=1139000 and x<1161000 and y>=1877200 and
y<1897800:
quad[2].append(line[2])
elif x>=1161000 and x<1183000 and y>=1897800 and
y<1918400:
quad[3].append(line[2])
elif x>=1183000 and x<1205000 y>=1918400 and y<1939000:
quad[4].append(line[2])
for i in range(0,5):
theft_c = 0
criminal_c=0
burglary_c=0
assault_c=0
narcotics_c=0
for j in range(len(quad[i])):
crime_array = quad[i][j].strip().split(',')
crime_type = str(crime_array[5])
if crime_type == 'THEFT':
theft_c = theft_c + 1
elif crime_type=='CRIMINAL DAMAGE':
criminal_c = criminal_c + 1
elif crime_type=='BURGLARY':
burglary_c = burglary_c + 1
elif crime_type=='ASSAULT':
assault_c = assault_c + 1
elif crime_type=='NARCOTICS':
narcotics_c = narcotics_c + 1
total_crimes = theft_c + criminal_c + burglary_c + assault_c +
narcotics_c
print '\n\nFor Area ' + str(i+1) + ' – Occurrence of Crime types
are: '
print '-------------------------------------------------------------'
print '\t\tTHEFT\t\t\t: '+str(theft_c)
print '\t\tCRIMINAL DAMAGE\t\t: '+str(criminal_c)
print '\t\tBURGLARY\t\t: '+str(burglary_c)
print '\t\tASSAULT\t\t\t: '+str(assault_c)
print '\t\tNARCOTICS\t\t: '+str(narcotics_c)
most = max(int(theft_c),int(criminal_c), int(burglary_c),
int(assault_c), int(narcotics_c))
if most==theft_c:
most_crime='THEFT'
elif most==criminal_c:
most_crime='CRIMINAL DAMAGE'
elif most==burglary_c:
most_crime='BURGLARY'
elif most==assault_c:
most_crime='ASSAULT'
elif most==narcotics_c:
most_crime='NARCOTICS'
print '\n\t\t=> Total Crimes ccurred and reported in above Area
is : ' + str(total_crimes) + ' reports.'
Print '\n\t\t=> Also the most ccurred crime in above Area is : ' +
most_crime + ' – ' +str(most) + ' times.'
tab[i].append(theft_c)
tab[i].append(criminal_c)
tab[i].append(burglary_c)
tab[i].append(assault_c)
tab[i].append(narcotics_c)
print
'\n\n****************************************************
**********************************************'
print
'\n\t\t\tTHEFT\t\tCRIMINAL\tBURGLARY\tASSAULT\t\tNARCOTICS'
for i in range(0,5):
print "\nArea
"+str(i+1)+"\t\t\t"+str(tab[i][0])+"\t\t"+str(tab[i][1])+"\t\t"+str(tab[i][
2])+"\t\t"+str(tab[i][3])+"\t\t"+str(tab[i][4])
print
'\n\n****************************************************
**********************************************'
print '\n\t* Total number of Tuples analysed are : ' + str(count)
print
'\n******************************************************
********************************************\n\n'
#print "{0}\t{1}".format(output, 1)
#print "{0}\t{1}".format(output, 1)