from sys import stdin
input = stdin.readline

num_list = list(map(int, input().split()))

print(min(num_list))
from sys import stdin
input = stdin.readline

num_list = list(map(int, input().split()))

print(min(num_list))