Continued Fractions

medium
<a href="https://codeforces.com/problemset/problem/305/B">https://codeforces.com/problemset/problem/305/B</a>

Input Format

.

Output Format

.

Constraints

.

Notice

.

Example

Input
9 4
3
2 3 1
Output
YES
Previous
Find Pair
Next
Vus The Cossaick And Strings

Related Questions