input: Write a function to determine if it is possible to represent a number as a complex number in Python. If it is possible, return the string representation of the complex number, else return an error message. If the input is invalid, return "Invalid input".
  
  class ComplexNumber:
      def __init__(self, real, imaginary):
          self.real = real
          self.imaginary = imaginary
  
      def __str__(self):
          return "({0} + {1}i)".format(self.real, self.imaginary)
  
  def represent_as_complex(number):
      try:
          real, imaginary = map(float, number.split('+'))
          complex_num = ComplexNumber(real, imaginary)
          return str(complex_num)
      except:
          return "Invalid input"
  
  assert represent_as_complex("3+4i")=="(3.0 + 4.0i)"
  assert represent_as_complex("0+1i")=="(0.0 + 1.0i)"
  assert represent_as_complex("4+0i")=="(4.0 + 0.0i)"
  assert represent_as_complex("1+2i")=="(1.0 + 2.0i)"
  assert represent_as_complex("abc+defi")=="Invalid input"
output: def represent_as_complex(number):
      try:
          real, imaginary = map(float, number.split('+'))
          complex_num = ComplexNumber(real, imaginary)
          return str(complex_num)
      except:
          return "Invalid input"