#include using namespace std; int main(){ int N,M; cin >> N >>M; N%=10; M%=4; int ans=1; int i; for(i=0;i