Circles

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

There are NN circles on a plane. The center of the ii-th circle is (x_i,y_i)(x\_i, y\_i), and the radius of this circle is x_i2+y_i2\sqrt{x\_i^2 + y\_i^2}.

Count the number of lattice points (points with integer coordinates) that are inside at least one of the circles. Note that the boundaries are considered to be inside.

입력

NN
x_1x\_1 y_1y\_1
x_2x\_2 y_2y\_2
\vdots
x_Nx\_N y_Ny\_N

출력

Print the answer in a single line.

제한

  • 1N1051 \leq N \leq 10^5
  • 105x_i,y_i105-10^5 \leq x\_i, y\_i \leq 10^5
  • (x_i,y_i)(x\_i, y\_i) are pairwise distinct.
  • (x_i,y_i)(0,0)(x\_i,y\_i) \neq (0, 0)
  • All values in the input are integers.