Number of paths

You are located on the point (0,0)(0, 0) of an infinite integer grid, and you need to go to (x,y)(x, y). You have two follow two conditions when moving:

In how many ways can you reach (x,y)(x, y)?

Input

Input consists of several cases with two integers xx and yy, each between 2000-2000 and 20002000. A case with x=y=0x = y = 0 ends the input.

Output

For every case, print the number of ways to go from (0,0)(0, 0) to (x,y)(x, y). Since this number can be huge, compute it modulo 108+910^8 + 9.

Problem information

Author: Salvador Roura

Generation: 2026-01-25T10:24:44.536Z

© Jutge.org, 2006–2026.
https://jutge.org