#include<iostream>

using namespace std; 
int main()
{
    int creditScore,income;
    
    cin>>creditScore;
    cin>>income;
    
    try{
        if(creditScore<0 || income <0){
            throw "Invalid input";
        }
        
        if(creditScore < 700) {
            throw "Low credit score";
        }
        try {
            
        
        if(income < 30000){
            throw "Insufficient income";
        }
        cout<<"Loan approved";
    }
    catch (const char*msg){
        cout<<msg;
    }
    return 0;
    }