#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:836777216")
using namespace std;
int dp[205][205];
int used[205][205];
int h, t, R;
int n, m;
int a[205][2];
int b[205][2];
int bfs(int x, int y) {
  memset((dp), (-1), sizeof((dp)));
  deque<pair<int, int> > d;
  d.push_back(make_pair(x, y));
  dp[x][y] = 0;
  while (d.size()) {
    pair<int, int> top = d.front();
    d.pop_front();
    for (int(i) = 0; (i) < (n); (i)++) {
      if (top.first - (i + 1) >= 0) {
        int nx = top.first - (i + 1) + a[i][0];
        int ny = top.second + a[i][1];
        if (nx + ny <= R) {
          if (dp[nx][ny] == -1) {
            dp[nx][ny] = dp[top.first][top.second] + 1;
            if (nx + ny == 0) {
              return dp[nx][ny];
            }
            d.push_back(make_pair(nx, ny));
          }
        }
      }
    }
    for (int(i) = 0; (i) < (m); (i)++) {
      if (top.second - (i + 1) >= 0) {
        int nx = top.first + b[i][0];
        int ny = top.second - (i + 1) + b[i][1];
        if (nx + ny <= R) {
          if (dp[nx][ny] == -1) {
            dp[nx][ny] = dp[top.first][top.second] + 1;
            if (nx + ny == 0) {
              return dp[nx][ny];
            }
            d.push_back(make_pair(nx, ny));
          }
        }
      }
    }
  }
  return -1;
}
bool dfs1(int x, int y) {
  used[x][y] = 1;
  bool ok = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (x - (i + 1) >= 0) {
      int nx = x - (i + 1) + a[i][0];
      int ny = y + a[i][1];
      if (nx + ny <= R) {
        if (used[nx][ny] == 1) {
          return 1;
        }
        if (used[nx][ny] == 0) {
          ok |= dfs1(nx, ny);
        }
        if (ok) return 1;
      }
    }
  }
  for (int(i) = 0; (i) < (m); (i)++) {
    if (y - (i + 1) >= 0) {
      int nx = x + b[i][0];
      int ny = y - (i + 1) + b[i][1];
      if (nx + ny <= R) {
        if (used[nx][ny] == 1) {
          return 1;
        }
        if (used[nx][ny] == 0) {
          ok |= dfs1(nx, ny);
        }
        if (ok) return 1;
      }
    }
  }
  used[x][y] = 2;
  return ok;
}
int dfs2(int x, int y) {
  if (x + y > R) {
    return 0;
  }
  if (dp[x][y]) {
    return dp[x][y];
  }
  for (int(i) = 0; (i) < (n); (i)++) {
    if (x - (i + 1) >= 0) {
      int nx = x - (i + 1) + a[i][0];
      int ny = y + a[i][1];
      dp[x][y] = max(dp[x][y], dfs2(nx, ny) + 1);
    }
  }
  for (int(i) = 0; (i) < (m); (i)++) {
    if (y - (i + 1) >= 0) {
      int nx = x + b[i][0];
      int ny = y - (i + 1) + b[i][1];
      dp[x][y] = max(dp[x][y], dfs2(nx, ny) + 1);
    }
  }
  return dp[x][y];
}
int main(void) {
  scanf("%d%d%d", &h, &t, &R);
  scanf("%d", &n);
  for (int(i) = 0; (i) < (n); (i)++) {
    scanf("%d%d", &a[i][0], &a[i][1]);
  }
  scanf("%d", &m);
  for (int(i) = 0; (i) < (m); (i)++) {
    scanf("%d%d", &b[i][0], &b[i][1]);
  }
  int ans = bfs(h, t);
  if (ans > 0) {
    printf("Ivan\n%d\n", ans);
    return 0;
  }
  memset((used), (0), sizeof((used)));
  bool cycle = dfs1(h, t);
  if (cycle) {
    printf("Draw\n");
    return 0;
  }
  memset((dp), (0), sizeof((dp)));
  ans = dfs2(h, t);
  printf("Zmey\n%d\n", ans);
  return 0;
}
