#include #include int main(){ std::cin.tie(nullptr)->sync_with_stdio(false); int N; std::cin >> N; while(N--){ long long a, b, c; std::cin >> a >> b >> c; std::cout << (atcoder::modint998244353(a*a+b*b+c*c)/(c*c)).val() << "\n"; } return 0; }