#include #include #include using namespace std; #define ll long long #define pbb push_back #define ppb pop_back #define fii first #define see second #define tezz std::ios::sync_with_stdio(false);std::cin.tie(NULL);std::cout.tie(NULL); bool ch(char c){ if(c=='A' || c=='E' || c=='I' || c=='O' || c=='U' || c=='Y') return true; else return false; } int main() { tezz ll d1,d2; cin>>d1>>d2; if(d2%d1==0) cout<<0; else cout<<8; return 0; }