24 Game

You are given an array of 4 integers. Each integer can be used exactly once. You can use the four operations +, -, *, / in any order, with parentheses in any arrangement. Determine if it's possible to use these four numbers and operations to produce 24.

Division is real division, not integer division. Because intermediate values can be fractions such as 8/3, an exact rational representation avoids floating point error.

Examples
Input: [1,1,1,1]
Output: false
Hints

24 Game

You are given an array of 4 integers. Each integer can be used exactly once. You can use the four operations +, -, *, / in any order, with parentheses in any arrangement. Determine if it's possible to use these four numbers and operations to produce 24.