Help in CSES problem divisors analysis

Problem Link.

In this problem, we have to give print

Number of divisors of the number
Sum of divisors
Product of divisors

I am not getting the correct answer for the product of divisors.

Please help me where my code is wrong.

My solution
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef tree<pair<int,int>,null_type,less<pair<int,int>>,rb_tree_tag,tree_order_statistics_node_update> oset;

#define int long long
const int mod = 1e9+7;

int power(int a,int b,int M){
int result=1;
while(b>0)
{
if(b % 2 ==1)
result=(result * a)%M;
a=(a*a)%M;
b=b/2;
}
return result%mod;
}

int Sum_OF_DIVISORS(int x , int y){
int l = power(x,y+1,mod)-1;
if(l < 0)
l+=mod;
int q = power(x-1,mod-2,mod);
l = (l*q)%mod;
return l;
}

void test_case(){
int n;
cin >> n;
int divisors = 1;
int sum = 1;
int product = 1;
bool ok = false;
for(int i = 0 ; i < n ; i++){
int x , y;
cin >> x >> y;
if(y%2)
ok = true;
divisors = (divisors*(y+1))%mod;
sum = (sum*(Sum_OF_DIVISORS(x,y)))%mod;
product = (product * power(x,y,mod))%mod;
}
n = product;
int p = (divisors*power(2,mod-2,mod))%mod;
product = power(product,p,mod);
if(!ok)
product = (product * (int)sqrt(n))%mod;
cout<<divisors<<" “<<sum<<” “<<product<<” ";
}

int32_t main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t = 1;
while(t–){
test_case();
}
return 0;
}

My code fails at test

100
2 80
3 69
5 91
7 47
11 74
13 75
17 94
19 22
23 100
29 43
31 50
37 82
41 47
43 40
47 51
53 90
59 27
61 98
67 85
71 47
73 14
79 55
83 82
89 52
97 9
101 65
103 90
107 86
109 45
113 52
127 52
131 95
137 40
139 85
149 3
151 46
157 77
163 16
167 59
173 32
179 22
181 41
191 87
193 89
197 78
199 59
211 78
223 34
227 26
229 71
233 9
239 82
241 68
251 80
257 74
263 100
269 6
271 10
277 53
281 84
283 80
293 7
307 87
311 3
313 82
317 26
331 26
337 14
347 37
349 26
353 58
359 96
367 73
373 41
379 2
383 79
389 43
397 56
401 74
409 30
419 71
421 6
431 100
433 72
439 93
443 83
449 40
457 28
461 79
463 24
467 68
479 68
487 68
491 24
499 100
503 85
509 7
521 96
523 64
541 91

My answer
689682945 950748992 915719302

Correct answer
689682945 950748992 115729452