#include <bits/stdc++.h>
using namespace std;
int dp[222][222];
int fh[222][2], ft[222][2];
int qx[1 << 17], qy[1 << 17], qs[1 << 17], pos, q;
int h, t, r, n, m, loop;
int go(int x, int y) {
  if (x + y > r) return 0;
  int& res = dp[x][y];
  if (res == -2) {
    loop = 1;
  } else if (res == -1) {
    res = -2;
    int val = -0x3f3f3f3f;
    for (int z = 1; z <= min(x, n); z++) {
      int nx = x - z + fh[z][0];
      int ny = y + fh[z][1];
      val = max(val, 1 + go(nx, ny));
    }
    for (int z = 1; z <= min(y, m); z++) {
      int nx = x + ft[z][0];
      int ny = y - z + ft[z][1];
      val = max(val, 1 + go(nx, ny));
    }
    res = val;
  }
  return res;
}
void add(int x, int y, int s) {
  if (x + y <= r && !dp[x][y]++) qx[q] = x, qy[q] = y, qs[q++] = s;
}
int main() {
  cin >> h >> t >> r;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> fh[i][0] >> fh[i][1];
  cin >> m;
  for (int i = 1; i <= m; i++) cin >> ft[i][0] >> ft[i][1];
  add(h, t, 0);
  while (pos < q) {
    int x = qx[pos], y = qy[pos], s = qs[pos];
    pos++;
    if (x + y == 0) {
      cout << "Ivan\n" << s << endl;
      return 0;
    }
    for (int z = 1; z <= min(x, n); z++) {
      int nx = x - z + fh[z][0], ny = y + fh[z][1];
      add(nx, ny, s + 1);
    }
    for (int z = 1; z <= min(y, m); z++) {
      int nx = x + ft[z][0], ny = y - z + ft[z][1];
      add(nx, ny, s + 1);
    }
  }
  memset(dp, -1, sizeof(dp));
  int res = go(h, t);
  if (loop)
    cout << "Draw" << endl;
  else
    cout << "Zmey\n" << res << endl;
  return 0;
}
