#include <bits/stdc++.h>
using namespace std;
struct stuff {
  int H, T;
} tmp, ins;
int N, M, H, T, R, ans;
int L[205][205], vis[205][205];
stuff A[205], B[205];
bool draw, visit[205][205];
queue<stuff> q;
stack<stuff> s;
int win() {
  tmp.H = H;
  tmp.T = T;
  L[H][T] = 0;
  q.push(tmp);
  while (!q.empty()) {
    tmp = q.front();
    q.pop();
    if (tmp.H == 0 && tmp.T == 0) return L[tmp.H][tmp.T];
    for (int i = 1; i <= min(tmp.H, N); ++i) {
      ins.H = tmp.H - i + A[i].H;
      ins.T = tmp.T + A[i].T;
      if (ins.H + ins.T > R) continue;
      if (L[ins.H][ins.T] == -1) {
        L[ins.H][ins.T] = L[tmp.H][tmp.T] + 1;
        q.push(ins);
      }
    }
    for (int i = 1; i <= min(tmp.T, M); ++i) {
      ins.H = tmp.H + B[i].H;
      ins.T = tmp.T - i + B[i].T;
      if (ins.H + ins.T > R) continue;
      if (L[ins.H][ins.T] == -1) {
        L[ins.H][ins.T] = L[tmp.H][tmp.T] + 1;
        q.push(ins);
      }
    }
  }
  return -1;
}
bool checkDraw(int X, int Y) {
  if (vis[X][Y] == 1) return 1;
  if (vis[X][Y] == 2) return 0;
  vis[X][Y] = 1;
  for (int i = 1; i <= min(N, X); ++i) {
    ins.H = X - i + A[i].H;
    ins.T = Y + A[i].T;
    if (ins.H + ins.T > R) continue;
    if (checkDraw(ins.H, ins.T)) return 1;
  }
  for (int i = 1; i <= min(Y, M); ++i) {
    ins.H = X + B[i].H;
    ins.T = Y - i + B[i].T;
    if (ins.H + ins.T > R) continue;
    if (checkDraw(ins.H, ins.T)) return 1;
  }
  vis[X][Y] = 2;
  return 0;
}
void topo(int X, int Y) {
  visit[X][Y] = 1;
  for (int i = 1; i <= min(X, N); ++i) {
    ins.H = X - i + A[i].H;
    ins.T = Y + A[i].T;
    if (ins.H + ins.T > R) continue;
    if (!visit[ins.H][ins.T]) topo(ins.H, ins.T);
  }
  for (int i = 1; i <= min(Y, M); ++i) {
    ins.H = X + B[i].H;
    ins.T = Y - i + B[i].T;
    if (ins.H + ins.T > R) continue;
    if (!visit[ins.H][ins.T]) topo(ins.H, ins.T);
  }
  ins.H = X;
  ins.T = Y;
  s.push(ins);
  return;
}
int lose() {
  memset(L, 0, sizeof(L));
  topo(H, T);
  while (!s.empty()) {
    tmp = s.top();
    s.pop();
    for (int i = 1; i <= min(tmp.H, N); ++i) {
      ins.H = tmp.H - i + A[i].H;
      ins.T = tmp.T + A[i].T;
      if (ins.H + ins.T > R)
        ans = max(ans, L[tmp.H][tmp.T] + 1);
      else
        L[ins.H][ins.T] = max(L[ins.H][ins.T], L[tmp.H][tmp.T] + 1);
    }
    for (int i = 1; i <= min(tmp.T, M); ++i) {
      ins.H = tmp.H + B[i].H;
      ins.T = tmp.T - i + B[i].T;
      if (ins.H + ins.T > R)
        ans = max(ans, L[tmp.H][tmp.T] + 1);
      else
        L[ins.H][ins.T] = max(L[ins.H][ins.T], L[tmp.H][tmp.T] + 1);
    }
  }
  return ans;
}
int main() {
  memset(L, -1, sizeof(L));
  scanf("%d%d%d", &H, &T, &R);
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i) scanf("%d%d", &A[i].H, &A[i].T);
  scanf("%d", &M);
  for (int i = 1; i <= M; ++i) scanf("%d%d", &B[i].H, &B[i].T);
  ans = win();
  if (ans != -1)
    printf("Ivan\n%d\n", ans);
  else if (checkDraw(H, T))
    printf("Draw\n");
  else
    printf("Zmey\n%d\n", lose());
}
