#include <iostream>
#include <array>
#include <algorithm>

int main() {
	std::array<int, 5> arr {5,3,24,9,7};
	
	std::sort(arr.begin(), arr.end());
	
	std::cout << arr[0] << std::endl << arr[1];
	
	return 0;
}