Consider the points on an infinite grid of equilateral triangles as shown on the right: Note that if we number the points from left to right and top to bottom, then groups of these points form the vertices of certain geometric shapes. For example, the sets of points {1,2,3} and {7,9,18} are the vertices of triangles, the sets {11,13,26,24} and {2,7,9,18} are the vertices of parallelograms, and the sets {4,5,9,13,12,7} and {8,10,17,21,32,34} are the vertices of hexagons. Write a program which will repeatedly accept a set of points on this triangular grid, analyze it, and determine whether the points are the vertices of one of the following “acceptable” figures: triangle, par- allelogram, or hexagon. In order for a figure to be acceptable, it must meet the following two conditions:
2/2 4 5 9 13 12 7 are the vertices of a hexagon 1 2 3 4 5 are not the vertices of an acceptable figure 47 are not the vertices of an acceptable figure 11 13 23 25 are not the vertices of an acceptable figure