CF1195F Geometers Anonymous Club

Description

Denis holds a Geometers Anonymous Club meeting in SIS. He has prepared $ n $ convex polygons numbered from $ 1 $ to $ n $ for the club. He plans to offer members of the club to calculate Minkowski sums of these polygons. More precisely, he plans to give $ q $ tasks, the $ i $ -th of them asks to calculate the sum of Minkowski of polygons with indices from $ l_i $ to $ r_i $ inclusive. The sum of Minkowski of two sets $ A $ and $ B $ is the set $ C = \{a + b : a \in A, b \in B\} $ . It can be proven that if $ A $ and $ B $ are convex polygons then $ C $ will also be a convex polygon. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1195F/6cb3a86dcaf05238ec4394822e407fdc522f38b9.png) Sum of two convex polygons To calculate the sum of Minkowski of $ p $ polygons ( $ p > 2 $ ), you need to calculate the sum of Minkowski of the first $ p - 1 $ polygons, and then calculate the sum of Minkowski of the resulting polygon and the $ p $ -th polygon. For the convenience of checking answers, Denis has decided to prepare and calculate the number of vertices in the sum of Minkowski for each task he prepared. Help him to do it.

Input Format

N/A

Output Format

N/A

Explanation/Hint

Description of the example: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1195F/7fef00df88160094dee94144ed635016f4f9336b.png) First, second and third polygons from the example ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1195F/b26197f6a29c4e49f72b5ed1cd886243ac11f90c.png) Minkowski sums of the first and second, the second and third and all polygons correspondingly