You have placed n points on a plane at coordinates (1,0),(2,0),…,(n,0).
Informally, for each i, you draw an angle of a_i degrees from vertex (i,0) in a direction chosen uniformly at random and independently from other angles.
Formally, for each i, a real variable α_i∈\[0;360) is chosen uniformly at random, and the angle is formed by two rays drawn from the point (i,0) at polar angles of α_i and α_i+a_i degrees. The interior of the angle consists of all points located at polar angles strictly between α_i and α_i+a_i degrees from the point (i,0).
Two angles are considered intersecting if there exists a point belonging to the interiors of both angles.
Find the probability that no two angles intersect, modulo 998,244,353 (see the Output section for details).
The first line contains a single integer n (2≤n≤105).
The second line contains n integers a_1,a_2,…,a_n (1≤a_i≤179).
Print the probability that no two angles intersect, modulo 998,244,353.
Formally, let M=998,244,353. It can be shown that the required probability can be expressed as an irreducible fraction qp, where p and q are integers and q≡0(modM). Print the integer equal to p⋅q−1modM. In other words, print such an integer x that 0≤x<M and x⋅q≡p(modM).
In the first example test, the actual probability is 165.
In the second example test, the actual probability is 641.
In the third example test, the actual probability is 5184347.