#OLD133. businessmen and followers

businessmen and followers

Description

There are n businessmen and n followers. They are going to cross the river. There is a boat on the river. The boat can only carry m individuals. Businessmen and followers can row boats. But when the number of followers is more than the number ofbusinessmen including on the boats, followers will kill businessmen and rob the goods. If allbusinessmenand all followers can safelycross the riverafter one or more uses of the boat, the output isminimumtimes of crossing the river, if they can not cross the river ,output "NO".

Format

Input

There are multiple test cases. For each case, line of the input contains two integers n (1<=n<=1e9) and m(1<=m<=1e9),n is the number of businessmen and followers, m is the capacity of the boat, and it is sure that (n/2<m<=n).

Output

For each test cases, output a number in a line that representing minimum times of crossing the river, and outputing the "NO" represents all businessmen and all followers can't safely crossing the river.

Samples

1 1
3 2
NO
11

Hint

when n=3,m=2, (x, y) is state, x represents the businessmen of this side, y represents the followers of this side, state transfer(3,3)->(3,1)->(3,2)->(3,0)->(3,1)->(1,1)->(2,2)->(0,2)->(0,3)->(0,1)->(0,2)->(0,0),the state transfer 11 times.