#include<iostream>
#include<stdexcept>
using namespace std;
class ClassFullException:public exception {
    public:
    const char *what() const noexcept override {
        return "Error:Insufficient Slots";
    }
};
void enrollStudents(int availableSlots,int studentsTryingToEnroll) {
    if(availableSlots<0||studentsTryingToEnroll<0) {
        cout<<"Invalid Input";
        return;
    }
    if(studentsTryingToEnroll>availableSlots){
        throw ClassFullException();
    }
    cout<<"Enrollment successful";
    }
int main() {
    int avaiableSlots,studentsTryingToEnroll;
    cin>> availableSlots >> studentsTryingToEnroll;
    try{
        enrollStudents(availableSlots,studentsTryingToEnroll);
    } catch(const ClassFullException& e) {
        cout<<e.what();
    }
    return 0;
}