Number of pieces:
Check if a point is in the set above:

Instructions