We have mugs of two capacity but they don’t have any markings on them neither we can estimate anything(The marked values can only be taken as full, no fractions can be taken of them). Moreover, we have an infinite supply of water. But the problem is there is demand for a fixed amount of water no less, no more. Is it possible to measure the exact amount of water needed using the available mugs?
For each test case, print “YES” (Without Quotes) if the measurement is possible and “NO” (Without Quotes) if measurement is not possible.
For the first case, fill out a 5-litre jug once and fill 3-litre jug two times hence, yes we can measure the required amount.
For the second case, it is not possible to measure 3 litres by any combination.