#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[250], b[250];
int n, m, r, dp[250][250], loop, qx[1 << 17], qy[1 << 17], qs[1 << 17], q;
void add(int first, int second, int s) {
  if (first + second <= r && !dp[first][second]++)
    qx[q] = first, qy[q] = second, qs[q++] = s;
}
int go(int first, int second) {
  if (first + second > r) return 0;
  int &res = dp[first][second];
  if (res == -2)
    loop = 1;
  else if (res == -1) {
    res = -2;
    int val = -2;
    for (int i = 1; i <= min(n, first); i++)
      val = max(val, go(first - i + a[i].first, second + a[i].second) + 1);
    for (int i = 1; i <= min(m, second); i++)
      val = max(val, go(first + b[i].first, second - i + b[i].second) + 1);
    res = val;
  }
  return res;
}
int main() {
  int i, j, k, h, t;
  while (~scanf("%d%d%d", &h, &t, &r)) {
    scanf("%d", &n);
    for (i = 1; i <= n; i++) scanf("%d%d", &a[i].first, &a[i].second);
    scanf("%d", &m);
    for (i = 1; i <= m; i++) scanf("%d%d", &b[i].first, &b[i].second);
    q = 0;
    memset(dp, 0, sizeof(dp));
    add(h, t, 0);
    int pos = 0;
    while (pos < q) {
      int first = qx[pos], second = qy[pos], s = qs[pos++];
      if (first + second == 0) {
        printf("Ivan\n%d\n", s);
        return 0;
      }
      for (i = 1; i <= min(first, n); i++) {
        add(first - i + a[i].first, second + a[i].second, s + 1);
      }
      for (i = 1; i <= min(second, m); i++) {
        add(first + b[i].first, second - i + b[i].second, s + 1);
      }
    }
    memset(dp, -1, sizeof(dp));
    loop = 0;
    int res = go(h, t);
    if (loop)
      puts("Draw");
    else
      printf("Zmey\n%d\n", dp[h][t]);
  }
  return 0;
}
