#include<iostream> using namespace std; int main(){ int m,k; cin>>m>>k; if(k*3==m) cout<<"YES"; else cout<<"NO"; return 0; }