Help me in solving PPSCPP135 problem

My issue

((B - A) % 3 == 0) why

My code

#include <iostream>
#include <cmath>
using namespace std;

int main() {
    int t;
    cin >> t;
    
    for(int i = 1; i <= t; i++) {
        int A, B;
        cin >> A >> B;

        int diff = B - A;
        if ((B - A) % 3 == 0) {
            cout << "Yes\n";
        }
        else if ((B - A) % 3 == 1) {
            cout << "Yes\n";
        }
        else {
            cout << "No\n";
        }
    }
    return 0;
}

Learning course: Complete C++ course
Problem Link: CodeChef: Practical coding for everyone

@rr2731
because u are adding 1 and 2 to A so U can check for if the difference is divisible by 3 or not .