human
I found an interesting problem on https://leetcode.com/problems/integer-break/:
Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.


For example, given n = 2, return 1 (2 = 1 + 1).
given n = 10, return 36 (10 = 3 + 3 + 4).


Note: You may assume that n is not less than 2 and not larger than 58.

Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases.

I tried it in Python, but could not do it. Can you solve it?
assistant
#Here is the Python program you requested.

class Solution:
     def integerBreak(self, n):
         """
         :type n: int
         :rtype: int
         """
         
         import math
         if n == 2 or n == 3:
             return n-1
         else:
             if n % 3 == 1:
                 m1 = 2           
             elif n % 3 == 2:
                 m1 = 1
             else:
                 m1 = 0
             m2 = (n-2*m1) // 3
             return 2**m1 * 3**m2
         
         
         # import math
         # if n == 2 or n == 3:
         #     return n - 1
         # else:
         #     x = n/math.e
         #     ans = 0
         #     for y in [math.floor(x), math.ceil(x)]:
         #         x1 = int(n/y)
         #         x2 = x1 + 1
         #         n2 = n - x1*y
         #         n1 = y - n2
         #         ans = max(ans, (x1**n1) * (x2**n2))
         #     return int(ans)