Hitagi Senjougahara has a piece of paper of height $h$ and width $w$. The list is divided into $1 \times 1$ cells. Let's assume that the bottom left corner of the paper has coordinates $(0, 0)$ and the top right corner has coordinates $(h, w)$.
Hitagi can make multiple cuts, each one being either vertical or horizontal. For horizontal cuts, Hitagi chooses integer height $h' \in [1, h - 1]$ and cuts all pieces of paper that cross the line. For vertical cuts, Hitagi chooses integer width $w' \in [1, w - 1]$ and cuts all pieces of paper that cross the line. So if she performs $c_h$ horizontal cuts at different heights and $c_w$ vertical cuts at different widths, she will end up with $(c_h + 1)(c_w + 1)$ pieces of paper.
Now Hitagi wonders what is the minimal number of cuts needed to make so all rectangular pieces of paper she ends up with have an area not exceeding $s$.
You are tasked to find the answer for $t$ tuples $h, w, s$.
Input
First line contains integer $t$ ($1 \le t \le 1\,000$) — number of tests you need to solve.
Next $t$ lines contain tuples of integers $h, w, s$ ($1 \le h, w, s \le 10^9$) — dimensions of the paper and wanted area.
Output
Output $t$ lines, each containing 1 integer — answer for the tuple.
Examples
Input 1
5 2 2 1 1 7 2 4 4 17 4 4 15 120 216 34
Output 1
2 3 0 1 55