#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int MAXN = 210;
bool used[MAXN][MAXN], circle[MAXN][MAXN];
int f[MAXN][MAXN], h1[MAXN], t1[MAXN], h2[MAXN], t2[MAXN], n, m, R;
queue<pair<int, int> > q;
void gao() {
  used[0][0] = true;
  f[0][0] = 0;
  q.push(make_pair(0, 0));
  while (!q.empty()) {
    int h = q.front().first, t = q.front().second;
    q.pop();
    for (int i = 1; i <= n; i++) {
      int h0 = h + i - h1[i], t0 = t - t1[i];
      if (h0 >= i && t0 >= 0 && h0 + t0 <= R && !used[h0][t0]) {
        used[h0][t0] = true;
        f[h0][t0] = f[h][t] + 1;
        q.push(make_pair(h0, t0));
      }
    }
    for (int i = 1; i <= m; i++) {
      int h0 = h - h2[i], t0 = t + i - t2[i];
      if (h0 >= 0 && t0 >= i && h0 + t0 <= R && !used[h0][t0]) {
        used[h0][t0] = true;
        f[h0][t0] = f[h][t] + 1;
        q.push(make_pair(h0, t0));
      }
    }
  }
}
int gao(int h, int t) {
  if (h + t > R) return 0;
  if (circle[h][t]) return INF;
  if (used[h][t]) return f[h][t];
  used[h][t] = circle[h][t] = true;
  for (int i = 1; i <= n && i <= h; i++) {
    int h0 = h - i + h1[i], t0 = t + t1[i];
    f[h][t] = min(INF, max(f[h][t], gao(h0, t0) + 1));
  }
  for (int i = 1; i <= m && i <= t; i++) {
    int h0 = h + h2[i], t0 = t - i + t2[i];
    f[h][t] = min(INF, max(f[h][t], gao(h0, t0) + 1));
  }
  circle[h][t] = false;
  return f[h][t];
}
int main() {
  int h, t;
  scanf("%d%d%d", &h, &t, &R);
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &h1[i], &t1[i]);
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) scanf("%d%d", &h2[i], &t2[i]);
  gao();
  if (used[h][t]) {
    printf("Ivan\n%d\n", f[h][t]);
  } else {
    int res = gao(h, t);
    if (res >= INF)
      puts("Draw");
    else
      printf("Zmey\n%d\n", res);
  }
  return 0;
}
