#include <iostream> #include <algorithm> #include <assert.h> using namespace std; long long readInt(long long l,long long r,char endd){ long long x=0; int cnt=0; int fi=-1; bool is_neg=false; while(true){ char g=getchar(); if(g=='-'){ assert(fi==-1); is_neg=true; continue; } if('0'<=g && g<='9'){ x*=10; x+=g-'0'; if(cnt==0){ fi=g-'0'; } cnt++; assert(fi!=0 || cnt==1); assert(fi!=0 || is_neg==false); assert(!(cnt>19 || ( cnt==19 && fi>1) )); } else if(g==endd){ if(is_neg){ x= -x; } assert(l<=x && x<=r); return x; } else { assert(false); } } } string readString(int l,int r,char endd){ string ret=""; int cnt=0; while(true){ char g=getchar(); assert(g!=-1); if(g==endd){ break; } cnt++; ret+=g; } assert(l<=cnt && cnt<=r); return ret; } long long readIntSp(long long l,long long r){ return readInt(l,r,' '); } long long readIntLn(long long l,long long r){ return readInt(l,r,'\n'); } string readStringLn(int l,int r){ return readString(l,r,'\n'); } string readStringSp(int l,int r){ return readString(l,r,' '); } void draw(){ printf("Draw\n"); } void first(){ printf("Miron\n"); } void second(){ printf("Slava\n"); } int main(){ //freopen("0.in.txt","r",stdin); //freopen("myout.txt","wb",stdout); int T; long long n,r1,r2,c1,c2; T=readIntLn(1,100000); while(T--){ n=readIntSp(1,1000000000000000000); r1=readIntSp(1,2); c1=readIntSp(1,n); r2=readIntSp(1,2); c2=readIntLn(1,n); assert(r1 != r2 || c1 != c2); if(c1 == c2){ draw(); continue; } if(r1 == r2){ if(c1 < c2){ long long dist= c2 -c1 -1 ; long long c11 = c1+ (dist+1)/2; long long c22 = c2 - dist/2; if(c11 > n/2){ first(); continue; } if(n+1-c22 > n/2){ second(); continue; } draw(); continue; } else { long long dist = c1 - c2 - 1; long long c11 = c1 - (dist+1)/2; long long c22 = c2 + dist/2; if(c22 > n/2){ second(); continue; } if(n+1-c11 >n/2){ first(); continue; } draw(); continue; } } else { if(c1< c2){ if(c2 - c1 == 1 && c1 <= n/2 ){ draw(); continue; } if(c2<= (n+1)/2){ second(); continue; } if(c1 >n/2 ){ first(); continue; } if(n%2){ long long dist2 = c2 - (n+1)/2; long long dist1 = (n+1)/2 -c1; if(dist1 == dist2 || dist2 +1 == dist1){ draw(); continue; } if(dist1 < dist2){ first(); } else { second(); } continue; } else { long long dist2 = c2 - n/2 - 1; long long dist1 = n/2 - c1; if(abs(dist1 - dist2) <= 1 || dist2+2 ==dist1){ draw(); continue; } if(dist1 < dist2){ first(); } else { second(); } continue; } } else { if(c1 - c2 == 1 && n+1-c1 <= n/2 ){ draw(); continue; } if(n+1-c2<= (n+1)/2){ second(); continue; } if(n+1-c1 >n/2 ){ first(); continue; } if(n%2){ long long dist2 = (n+1)/2 - c2; long long dist1 = c1-(n+1)/2 ; if(dist1 == dist2 || dist2 +1 == dist1){ draw(); continue; } if(dist1 < dist2){ first(); } else { second(); } continue; } else { long long dist2 = n/2 - c2; long long dist1 = c1 - n/2 - 1; if(abs(dist1 - dist2) <= 1 || dist2+2 ==dist1){ draw(); continue; } if(dist1 < dist2){ first(); } else { second(); } continue; } } } } assert(getchar()==-1); }