# Illustration of global variable visibility

def isInt2(s): 
        valid = True
        
        for i in range(0,len(s)):
            # The usual case
            if not (s[i] in "0123456789"):
                valid = False
            # A special case
            # Check the global variable which determines whether
            # we allow negative numbers.
            if i == 0 and s[i] == "-" and AllowingNegative:
                valid = True
                
        return valid


AllowingNegative = True
reply = raw_input("Enter an integer: ") 
if isInt2(reply): 
    print reply,"is an integer"
else:
    print reply,"is not an integer"


