#include <bits/stdc++.h>
using namespace std;
int n, m, k;
bool debug = false;
int nh[205], nt[205], mh[205], mt[205];
int h, t, R, mind = 2147483;
int bl[205][205], v[205][205];
bool loop = false, ivin = false;
int build(int hh, int tt) {
  if (hh + tt > R) {
    return 0;
  }
  if (bl[hh][tt] == 1) {
    return v[hh][tt];
  }
  if (bl[hh][tt] == -1) {
    return 2147483;
  }
  int ans = v[hh][tt];
  int hhh, ttt;
  bl[hh][tt] = -1;
  for (int i = 1; i <= min(n, hh); i++) {
    hhh = hh - i + nh[i];
    ttt = tt + nt[i];
    ans = max(build(hhh, ttt) + 1, ans);
  }
  for (int j = 1; j <= min(m, tt); j++) {
    hhh = hh + mh[j];
    ttt = tt - j + mt[j];
    ans = max(build(hhh, ttt) + 1, ans);
  }
  bl[hh][tt] = 1;
  return v[hh][tt] = ans;
}
int main() {
  scanf("%d%d%d", &h, &t, &R);
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", nh + i, nt + i);
  }
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", mh + i, mt + i);
  }
  queue<pair<int, int>> q;
  q.push(make_pair(0, 0));
  v[0][0] = -1;
  bl[0][0] = 1;
  int hhh, ttt;
  while (!q.empty()) {
    int hh = q.front().first, tt = q.front().second;
    q.pop();
    for (int i = 1; i <= n; i++) {
      hhh = hh + i - nh[i];
      ttt = tt - nt[i];
      if (hhh >= i && ttt >= 0) {
        if (hhh + ttt <= R && !bl[hhh][ttt]) {
          bl[hhh][ttt] = 1;
          v[hhh][ttt] = v[hh][tt] - 1;
          q.push(make_pair(hhh, ttt));
        }
      }
    }
    for (int j = 1; j <= m; j++) {
      hhh = hh - mh[j];
      ttt = tt - mt[j] + j;
      if (hhh >= 0 && ttt >= j) {
        if (hhh + ttt <= R && !bl[hhh][ttt]) {
          bl[hhh][ttt] = 1;
          v[hhh][ttt] = v[hh][tt] - 1;
          q.push(make_pair(hhh, ttt));
        }
      }
    }
  }
  int aa = build(h, t);
  if (aa < 0) {
    printf("Ivan\n%d\n", -aa - 1);
  } else if (aa >= 2147483) {
    puts("Draw");
  } else {
    printf("Zmey\n%d\n", aa);
  }
  return 0;
}
