시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB122353227.350%

문제

The unique location of Venice in northeastern Italy poses a shipping problem in many cases due to the canals and whatnot. To transport large quantities of spaghetti from Milan to Venice, a company uses trucks capable of carrying A tons from Milan to Mestre, the city on the mainland closest to Venice, and boats capable of carrying B tons from Mestre to Venice. One day, the depot in Venice requests an arbitrary amount of spaghetti, but not less than C tons and the depot in Mestre requests exactly D tons. Write a program to determine the smallest number of trucks to be sent from Milan to satisfy both orders such that every truck and boat used for the transport is loaded to capacity.

입력

There is a single line of input containing the four integers, A, B, C and D. (0 < A ≤ 100), (0 < B ≤ 20), (0 ≤ C ≤ 100), (0 ≤ D ≤ 100).

출력

The single output line consists of the sentence: We need t trucks and b boats. Where t is the number of trucks required and b is the number of boats required. If t or b is 1, then you should not pluralize the words “truck” or “boat” respectively. If there is no solution that meets the criteria, output: No solution.

예제 입력 1

31 13 50 28

예제 출력 1

We need 3 trucks and 5 boats.

예제 입력 2

100 20 30 10

예제 출력 2

No solution.

예제 입력 3

1 1 1 100

예제 출력 3

We need 101 trucks and 1 boat.