# -*- coding: utf-8 -*-

targetPressure = int(input())
tirePressure = int(input())

print(targetPressure - tirePressure)
# -*- coding: utf-8 -*-

targetPressure = int(input())
tirePressure = int(input())

print(targetPressure - tirePressure)
# -*- coding: utf-8 -*-