#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
constexpr int MAXN = 2e2 + 9;
constexpr int MOD = 1e9 + 9;
constexpr int INF = 1e9 + 9;
constexpr int LOG = 2e1 + 9;
int H, t, r, n, m, h[MAXN][MAXN], ans[MAXN][MAXN], st[MAXN][MAXN],
    ed[MAXN][MAXN], tme;
pair<int, int> ph[MAXN], pt[MAXN];
vector<pair<int, int> > G[MAXN][MAXN];
map<pair<pair<int, int>, pair<int, int> >, bool> has;
bool vis[MAXN][MAXN], Cycle;
void dfs(int x, int y) {
  vis[x][y] = true;
  st[x][y] = tme;
  tme++;
  for (auto p : G[x][y]) {
    int nx = p.first, ny = p.second;
    if (!vis[nx][ny]) {
      dfs(nx, ny);
    } else if (st[nx][ny] <= st[x][y] && st[x][y] <= ed[nx][ny]) {
      Cycle = true;
    }
  }
  ed[x][y] = tme;
  tme++;
}
int dfs1(int x, int y) {
  vis[x][y] = true;
  int tmp = 0;
  for (auto p : G[x][y]) {
    int nx = p.first, ny = p.second;
    if (!vis[nx][ny]) {
      tmp = max(tmp, dfs1(nx, ny) + 1);
    } else {
      tmp = max(tmp, ans[nx][ny] + 1);
    }
  }
  ans[x][y] = tmp;
  return ans[x][y];
}
void bfs(int sx, int sy) {
  memset(h, -1, sizeof h);
  memset(ed, 63, sizeof ed);
  queue<pair<int, int> > Q;
  h[sx][sy] = 0;
  Q.push(make_pair(sx, sy));
  while (!Q.empty()) {
    pair<int, int> tmp = Q.front();
    Q.pop();
    int x = tmp.first, y = tmp.second;
    for (int i = 1; i <= min(n, x); i++) {
      int nx = x - i + ph[i].first;
      int ny = y + ph[i].second;
      if (nx + ny <= r && h[nx][ny] == -1 && nx >= 0 && ny >= 0) {
        Q.push(make_pair(nx, ny));
        h[nx][ny] = h[x][y] + 1;
        G[x][y].push_back(make_pair(nx, ny));
        has[make_pair(make_pair(x, y), make_pair(nx, ny))] = true;
      } else if (nx + ny <= r &&
                 !has[make_pair(make_pair(x, y), make_pair(nx, ny))] &&
                 nx >= 0 && ny >= 0) {
        has[make_pair(make_pair(x, y), make_pair(nx, ny))] = true;
        G[x][y].push_back(make_pair(nx, ny));
      }
    }
    for (int i = 1; i <= min(m, y); i++) {
      int nx = x + pt[i].first;
      int ny = y - i + pt[i].second;
      if (nx + ny <= r && h[nx][ny] == -1 && nx >= 0 && ny >= 0) {
        Q.push(make_pair(nx, ny));
        h[nx][ny] = h[x][y] + 1;
        G[x][y].push_back(make_pair(nx, ny));
        has[make_pair(make_pair(x, y), make_pair(nx, ny))] = true;
      } else if (nx + ny <= r &&
                 !has[make_pair(make_pair(x, y), make_pair(nx, ny))] &&
                 nx >= 0 && ny >= 0) {
        has[make_pair(make_pair(x, y), make_pair(nx, ny))] = true;
        G[x][y].push_back(make_pair(nx, ny));
      }
    }
  }
  if (h[0][0] != -1) {
    cout << "Ivan\n" << h[0][0];
  } else {
    dfs(sx, sy);
    if (Cycle) {
      cout << "Draw";
    } else {
      memset(vis, 0, sizeof vis);
      cout << "Zmey\n" << dfs1(sx, sy) + 1;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> H >> t >> r;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> ph[i].first >> ph[i].second;
  }
  cin >> m;
  for (int i = 1; i <= m; i++) {
    cin >> pt[i].first >> pt[i].second;
  }
  bfs(H, t);
  return 0;
}
