1052

https://www.acmicpc.net/problem/1052/