Pick's Theorem expresses the area of a polygon, all of whose vertices are lattice points in a coordinate plane, in terms of the number of lattice points inside the polygon and the number of lattice points on the sides of the polygon. The formula is:
where is the number of lattice points in the interior and being the number of lattice points on the boundary. It is similar to the Shoelace Theorem, and although it is less powerful, it is a good tool to have in solving problems.
If a triangle on the lattice points with exactly points in its interior or on its edges, it has an area of . Such triangle must contain two lattice points distance from each other and one lattice point on a line parallel to the opposite edge distance apart. The minimum distance between two distinct lattice points is . If no two lattice points have distance , then by the area is more than 1 and similarly for the height. Removing a triangle either removes boundary point or turns interior point into a boundary point, accounting for the part. The part is accounted for by looking at the area of the unit triangle with boundary points, interior points, and area.
Solution by a1b2 (Edited by JeffersonJ)