<a href="https://codeforces.com/problemset/problem/1360/D">https://codeforces.com/problemset/problem/1360/D</a>
Input Format
.
Output Format
.
Constraints
.
Notice
.
Example
Input
5 8 7 8 1 6 10 999999733 999999732 999999733 999999733
Output
2 8 1 999999733 1