A criterion for admissibility of rules in the model system S4 and the intuitionistic logic