//easy
#include <iostream>

using namespace std;

int t, a, b, c;

int main(int argc, char const *argv[])
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    cin >> t;
    while (t--)
    {
        cin >> a >> b >> c;
        if (2 * b == a + c)
            cout << "YES" << endl;
        else if (2 * b < a + c)
        {
            if ((a + c) % (2 * b) == 0)
                cout << "YES" << endl;
            else
                cout << "NO" << endl;
        }
        else
        {
            if ((2 * b - a) % c == 0 || (2 * b - c) % a == 0)
                cout << "YES" << endl;
            else
                cout << "NO" << endl;
        }
    }

    return 0;
}
