Generic topological criterion for flat bands in two dimensions | Synapse