Implement a class Person.
Implement a class Teacher that extends Person.
List of people will be created:
Input data will be added to the list. Then next information will be printed:
total Teachers budget (sum of Salaries for Teachers)
total Teachers budget who runs Maths
average Teachers Salary
average Teachers Salary who runs Physics
Each line contains one of two types of people in the next format:
Person Surname Name Age
Teacher Surname Name Age Subject Salary
Print the next information (each number must be printed in a separate line):
total Teachers budget (sum of Salaries for Teachers)
total Teachers budget who runs Maths
average Teachers Salary
average Teachers Salary who runs Physics