In the given question, two rows of numbers are given. Resultant number in each row is to be worked out separately based on the following rules and the question below the rows of numbers is to be answered. The operations of numbers progress from left to right.
Rules:
1. If an even number is followed by a prime number, they are to be multiplied.
2. If an even number is followed by a composite odd number, odd number is to be subtracted from the even number.
3. If an odd number is followed by a prime number, the first number is to be divided by the second number.
4. If an odd number is followed by an even number which is a perfect square, they are to be added.
5. If an odd number is followed by composite odd number, they are to be added.
23−x,15−31,9−15,64−3
If x is the resultant of the first row, then what is the resultant of the second row?