Is brute force method is the correct approach

I am very confused with approach for this problem, as brute force method seems to be the approach for this question to me.
Please suggest me some other approach if it is there.

okay!!!
there is a very interesting property that
gcd ( fibo [ i ], fibo [y ] ) = fibo ( gcd ( i , y ) );
use this in a segment tree

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.