For this Question: Bob has an array of N numbers. He wants to calculate the product of the array but does not want integers greater than 10<sup>18</sup>. So, if the result exceeds 10<sup>18</sup>, print -1 instead.<b>Constraints:</b>
2 &le; N &le; 10<sup>5</sup>
0 &le; A<sub>i</sub> &le; 10<sup>18</sup>
All values in the input are integers.Print the value of A<sub>1</sub>×A<sub>2</sub>....×A<sub>N</sub> as an integer, or -1 if the value exceeds 10<sup>18</sup>.Sample Input 1 
2
1000000000 1000000000

Sample Output 1 
1000000000000000000

Sample Input 2 
3
101 9901 999999000001

Sample Output 2 
-1

<b>Explanation</b>
We have 1000000000×1000000000=1000000000000000000.
We have 101×9901×999999000001=1000000000000000001, which exceeds 10<sup>18</sup>, so we should print -1 instead., I have written this Solution Code: 
a = int(input())

ls = list(input().split())
temp=1
fl=0

for x in range(a):
    if(int(ls[x])==0):
        print(0)
        fl=1
        break

if(fl==0):
    for y in range(a):
        temp = temp*int(ls[y])
        if(temp>1000000000000000000):
            print(-1)
            break

    if(temp<1000000000000000000):
        print(temp), In this Programming Language: Python, Now tell me if this Code is compilable or not?