#include <bits/stdc++.h>
using namespace std;
int h, t, R, n, m;
int a[205], b[205], c[205], d[205];
int vis[205][205], deg[205][205];
template <class T>
void rd(T& x) {
  x = 0;
  int f = 1, ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 - '0' + ch;
    ch = getchar();
  }
  x *= f;
}
void solve() {
  queue<pair<int, int> > q;
  memset(vis, -1, sizeof(vis));
  q.push(make_pair(h, t));
  vis[h][t] = 0;
  while (!q.empty()) {
    int h = q.front().first, t = q.front().second;
    q.pop();
    if (h == 0 && t == 0) {
      puts("Ivan");
      printf("%d\n", vis[h][t]);
      return;
    }
    for (int i = 1; i <= min(h, n); i++) {
      int newh = h - i + a[i];
      int newt = t + b[i];
      if (newh + newt > R) continue;
      deg[newh][newt]++;
      if (~vis[newh][newt]) continue;
      vis[newh][newt] = vis[h][t] + 1;
      q.push(make_pair(newh, newt));
    }
    for (int i = 1; i <= min(t, m); i++) {
      int newh = h + c[i];
      int newt = t - i + d[i];
      if (newh + newt > R) continue;
      deg[newh][newt]++;
      if (~vis[newh][newt]) continue;
      vis[newh][newt] = vis[h][t] + 1;
      q.push(make_pair(newh, newt));
    }
  }
  int cnt = 0;
  for (int i = 0; i <= R; i++) {
    for (int j = 0; j <= R; j++) {
      if (~vis[i][j]) cnt++;
    }
  }
  q.push(make_pair(h, t));
  memset(vis, 0, sizeof(vis));
  int ans = 0;
  while (!q.empty()) {
    int h = q.front().first, t = q.front().second;
    q.pop();
    cnt--;
    for (int i = 1; i <= min(h, n); i++) {
      int newh = h - i + a[i];
      int newt = t + b[i];
      if (newh + newt > R) {
        ans = max(ans, vis[h][t] + 1);
        continue;
      }
      deg[newh][newt]--;
      if (deg[newh][newt] == 0) {
        q.push(make_pair(newh, newt));
      }
      vis[newh][newt] = max(vis[newh][newt], vis[h][t] + 1);
    }
    for (int i = 1; i <= min(t, m); i++) {
      int newh = h + c[i];
      int newt = t - i + d[i];
      if (newh + newt > R) {
        ans = max(ans, vis[h][t] + 1);
        continue;
      }
      deg[newh][newt]--;
      if (deg[newh][newt] == 0) {
        q.push(make_pair(newh, newt));
      }
      vis[newh][newt] = max(vis[newh][newt], vis[h][t] + 1);
    }
  }
  if (cnt != 0)
    puts("Draw");
  else {
    puts("Zmey");
    printf("%d\n", ans);
  }
}
int main() {
  rd(h), rd(t), rd(R);
  rd(n);
  for (int i = 1; i <= n; i++) {
    rd(a[i]), rd(b[i]);
  }
  rd(m);
  for (int i = 1; i <= m; i++) {
    rd(c[i]), rd(d[i]);
  }
  solve();
  return 0;
}
