with open('DULIEU.INP', 'r') as input_file:
p, q = map(int, input_file.readline().strip().split())
chu_vi = 2 * (p + q)
dien_tich = p * q
with open('KETQUA.OUT', 'w') as output_file:
output_file.write(f'Chu vi hinh chu nhat la: {chu_vi}\n')
output_file.write(f'Dien tich hinh chu nhat la: {dien_tich}\n')