<reponame>GMKanat/PP2_spring<filename>TSIS_1/topic_8/b.py
a = int(input())
b = int(input())
c = int(input())
d = int(input())
 
 
def min4(a, b, c, d):
    return min(min(min(a, b), c), d)
 
 
print(min4(a, b, c, d))
a = int(input())
b = int(input())
c = int(input())
d = int(input())
 
 
def min4(a, b, c, d):
    return min(min(min(a, b), c), d)
 
 
print(min4(a, b, c, d))