Function isImpossibleCheck