Can anyone tell me why i got this as wrong answer?

```
def isPrime(num): #function to check for prime Number
if(num>1):
flag=0
for i in range(2,num):
if(num%i==0):
flag=1
break
if(flag==0):
return True #it is a prime number
else:
return False
else:
return False
n,m=map(int,input().split())
first=[int(x) for x in range(n,m) if (isPrime(x))] #first list that contains prime numbers between n and m
second=[]
for i in first:
for j in first:
if(i!=j):
second.append(str(i)+str(j))
prime=list(set([int(x) for x in second if isPrime(int(x))]))
a=min(prime)
b=max(prime)
fib=[a,b]
for i in range(len(prime)-2):
c=a+b
a=b
b=c
fib.append(c)
print(fib[len(prime)-1])
```