For a given integer R consider all primitive Pythagorean triangles that can fit inside, without touching, a circle with radius R. Define F(R) to be the largest inradius of those triangles. You are given F(100)=36.
Find F(1018).