A simple topological factor determining the allowance of pericyclic reactions