At your last Thanksgiving get-together, your clumsy cousin accidentally let your corgi loose in the neighborhood park! The neighborhood park can be modeled as a fenced-in $$$N \times M$$$ square, which we represent as a 2D grid. Your corgi currently occupies the corner (0, 0), and the exit to the park is located at $$$(N, M)$$$.
Your family is interspersed throughout the park at various points $$$(x_i, y_i)$$$. You may call out to any of your family members to help catch your corgi; each family member has some agility $$$r_i$$$. If the corgi enters the circle centered at this person $$$(x_i, y_i)$$$ with radius $$$r_i$$$, then the person can catch the corgi.
Your corgi will attempt to avoid all family members, and cannot escape the park except through the exit. If your corgi manages to make it to the exit $$$(N, M)$$$ without being caught by a family member, then it will escape. What's the minimum number of family members you need to guarantee that your corgi will not escape?
The first line contains three integers $$$N, M, K$$$, where $$$N \times M$$$ $$$(1 \le N, M \le 10^9)$$$ gives the dimensions of the park, and $$$K$$$ $$$(1 \le K \le 10^3)$$$ denotes the number of family members.
The next $$$K$$$ lines each consist of three integers $$$x_i, y_i, r_i$$$ ($$$0 \le x_i \le N, 0 \le y_i \le M, 1 \le r_i \le 10^9$$$) denoting the position $$$(x_i, y_i)$$$ and the agility $$$r_i$$$ of the $$$i$$$th family member.
Output a single integer, the minimum number of family members needed to guarantee that your corgi will not escape, or -1 if it is impossible to guarantee.
10 8 102 2 13 5 18 2 26 7 21 2 12 6 12 2 17 5 16 4 14 0 1
3
8 8 42 2 13 8 21 0 13 5 1
1
The first sample test case can be visualized as follows. The green circles represent the family members that should be used to prevent your corgi from escaping. 
| Name |
|---|


