





'''simple docstring'''




lowercase__       : Tuple         =       {
    '''a''': '''AAAAA''',
    '''b''': '''AAAAB''',
    '''c''': '''AAABA''',
    '''d''': '''AAABB''',
    '''e''': '''AABAA''',
    '''f''': '''AABAB''',
    '''g''': '''AABBA''',
    '''h''': '''AABBB''',
    '''i''': '''ABAAA''',
    '''j''': '''BBBAA''',
    '''k''': '''ABAAB''',
    '''l''': '''ABABA''',
    '''m''': '''ABABB''',
    '''n''': '''ABBAA''',
    '''o''': '''ABBAB''',
    '''p''': '''ABBBA''',
    '''q''': '''ABBBB''',
    '''r''': '''BAAAA''',
    '''s''': '''BAAAB''',
    '''t''': '''BAABA''',
    '''u''': '''BAABB''',
    '''v''': '''BBBAB''',
    '''w''': '''BABAA''',
    '''x''': '''BABAB''',
    '''y''': '''BABBA''',
    '''z''': '''BABBB''',
    ''' ''': ''' ''',
}


lowercase__       : Union[str, Any]         =       {value: key for key, value in encode_dict.items()}






def 			_lowerCAmelCase     (    __snake_case    :					str     )	->	str:
     __A		:					Optional[int]						=			''
     for letter in word.lower():
          if letter.isalpha() or letter == " ":
               encoded += encode_dict[letter]
          else:
               raise Exception('encode() accepts only letters of the alphabet and spaces'     )
     return encoded






def 			_lowerCAmelCase     (    __snake_case    :					str     )	->	str:
     if set(__snake_case     ) - {"A", "B", " "} != set():
          raise Exception('decode() accepts only \'A\', \'B\' and spaces'     )
     __A		:					str						=			''
     for word in coded.split():
          while len(__snake_case     ) != 0:
               decoded += decode_dict[word[:5]]
               __A		:					Dict						=			word[5:]
          decoded += " "
     return decoded.strip()


if __name__ == "__main__":
  from doctest import testmod

  testmod()






'''simple docstring'''




def 			_lowerCAmelCase     (    __snake_case    :					int     )	->	bool:
     return sum(i for i in range(1					,				number // 2 + 1     ) if number % i == 0     ) == number


if __name__ == "__main__":
  print('''Program to check whether a number is a Perfect number or not...''')
  lowercase__       : int         =       int(input('''Enter number: ''').strip())
  print(f"""{number} is {"" if perfect(number) else "not "}a Perfect Number.""")