#include<bits/stdc++.h> using namespace std; long long n,x; int main(){ cin>>n; while(n--){ cin>>x; if(x%11==0){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; } } return 0; }