recognize PENCIL min and max functions