It would be way simpler to just return(a >= -30000000 && b >= -30000000 && a < 30000000 && b < 30000000) rather than have a whole if/else statement here.