Given an array of n integers. Find minimum number to be inserted in array, so that sum of all elements of array becomes prime. If sum is already prime, then return 0.

**Input:**

First line consists of T test cases. First line of every test case consists of N, denoting number of elements of array. Second line of every test case consists of elements of array.

**Output:**

Single line output, print the required answer.

**Constraints:**

1<=T<=100

1<=N<=1000

**Example:
Input:**

1

5

2 4 6 8 12

5

Ibrahim Nash | 79 |

Stark_Maverick | 77 |

Micky_Kt | 60 |

Lam Ngoc Pham | 58 |

Eduardo Feo | 58 |

Lam Ngoc Pham | 463 |

All Is Well | 399 |

Divvya Sinha | 374 |

Prateek Gole | 369 |

ioan | 323 |

akhayrutdinov | 3855 |

sanjay05 | 3366 |

Michael Riegger | 2028 |

Jasleen Kaur 2 | 2012 |

Quandray | 1965 |