Doctor Emmet is working on a safer device to travel in time. He gathered $N$ different and rare pieces of metal. Each piece may be compatible with some other different pieces. He has a complete list with $M$ distinct pairs of compatible metals. Any pair of metals that is not on the list is incompatible.
In order for the device to work, he must choose a set of metals such that each of them is compatible with at least $A$ others in that set. However, in order to preserve some balance, they must also be incompatible with at least $B$ others in that set.
More metals mean more energy and a safer device. This is why Doctor Emmet needs your help, he wants to know the size of the largest set he can choose that meets these criteria.