'''simple docstring'''






from __future__ import annotations

_UpperCAmelCase    :     Optional[int]         =       []





def  _SCREAMING_SNAKE_CASE		(      __snake_case							:			list[list[int]]   ,		__snake_case							:			int   ,		__snake_case							:			int				):
     for i in range(len(__snake_case				)				):
          if board[row][i] == 1:
               return False
     for i in range(len(__snake_case				)				):
          if board[i][column] == 1:
               return False
     for i, j in zip(range(__snake_case   ,		-1   ,		-1				)   ,		range(__snake_case   ,		-1   ,		-1				)				):
          if board[i][j] == 1:
               return False
     for i, j in zip(range(__snake_case   ,		-1   ,		-1				)   ,		range(__snake_case   ,		len(__snake_case				)				)				):
          if board[i][j] == 1:
               return False
     return True





def  _SCREAMING_SNAKE_CASE		(      __snake_case							:			list[list[int]]   ,		__snake_case							:			int				):
     if row >= len(__snake_case				):
          solution.append(__snake_case				)
          printboard(__snake_case				)
          print()
          return True
     for i in range(len(__snake_case				)				):
          if is_safe(__snake_case   ,		__snake_case   ,		__snake_case				):
               _A    		=  1
               solve(__snake_case   ,		row + 1				)
               _A    		=  0
     return False





def  _SCREAMING_SNAKE_CASE		(      __snake_case							:			list[list[int]]				):
     for i in range(len(__snake_case				)				):
          for j in range(len(__snake_case				)				):
               if board[i][j] == 1:
                    print('Q'   ,		end=' '				)
               else:
                    print('.'   ,		end=' '				)
          print()


# n=int(input("The no. of queens"))
_UpperCAmelCase    :     Any         =       8
_UpperCAmelCase    :     Dict         =       [[0 for i in range(n)] for j in range(n)]
solve(board, 0)
print('''The total no. of solutions are :''', len(solution))






def 	a (     A__      :  int	)       -> bool:





      """simple docstring"""



      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(input('Enter number: ').strip())
  print(f"{number} is {'' if perfect(number) else 'not '}a Perfect Number.")


