In a country of Unlearned Lessons 2
Victor has a program that helps him to find quickly GCD of many numbers. Therefore, the guard decided to change the rules: now Victor must find the greatest common divisor (GCD) of the numbers on the interval , and the guards must find the least common multiple (LCM). Who gets the less number that wins.
Input
The first line contains the number of elements in array. The second line contains numbers of array. The third line contains the number of queries . Each of the next lines contain three numbers . If you need to find the winner for a segment , if you need to replace the element at position to the number
Output
For each query with number print in a separate line "wins", if Victor wins, print "loser" if Victor lose and "draw" in a case of a draw.