def reverse_factorial(num):
  
  fact = num;
  reverse = 1;
  g = 1
  while (True):
    if (fact / reverse == 1):
      print str(reverse) + '!';
      
    elif (fact / reverse < 1):
      print fact / reverse
      print -1
      break;
    fact = fact / reverse
    reverse = reverse + 1;
  
   
    
   
  return


reverse_factorial(120)
#reverse_factorial(150)
1cdfe3a3ba3db1e3aa1df7f904017ef0385e3b1c
def reverse_factorial(num):
  
  fact = num;
  reverse = 1;
  g = 1
  while (True):
    if (fact / reverse == 1):
      print str(reverse) + '!';
      
    elif (fact / reverse < 1):
      print fact / reverse
      print -1
      break;
    fact = fact / reverse
    reverse = reverse + 1;
  
   
    
   
  return


reverse_factorial(120)
#reverse_factorial(150)