#include<iostream>
using namespace std;
int main()
{
    int creditScore,income;
    cin>>creditScore;
    cin>>income;
    try{
        if(creditScore<0||income<0)
        throw -1;
        if(creditScore<700)
        throw 1;
        try
        {
            if(income<30000)
            throw 2;
            cout<<"Loan approved";
        }
        catch(int e)
        {
            if(e==2)
            cout<<"Insfficient income";
        }
    }
    catch(int e)
    {
        if(e==-1)
        cout<<"Invalid input";
        else if(e==1)
    }
}