Davor has conquered the South Pole and is preparing for his next challenge, an Arctic expedition through Siberia, Greenland and Norway. He leaves on 31 December 2018, and he must have saved N kuna (the Croatian currency) by that day.
Every Monday Davor puts X kuna (X≤100) into the travel fund, every Tuesday X+K kuna, every Wednesday X+2K kuna, and so on, adding K more each day until Sunday, when he puts in X+6K kuna. The saving runs for 52 weeks, from Monday 1 January 2018 to Sunday 30 December 2018.
Given the amount N, print values X and K that collect exactly N kuna over that period. A solution always exists. If several exist, print the one with the greatest X and the smallest K.