#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > g;
pair<int, int> ifh[210];
pair<int, int> ift[210];
vector<int> p;
vector<int> was;
int bfs(int v) {
  was.resize(g.size(), -1);
  was[v] = 0;
  p.push_back(v);
  int l = 0;
  while (l < p.size()) {
    int v = p[l];
    l++;
    if (v == 0) break;
    for (int i = (0); i < (g[v].size()); ++i) {
      int to = g[v][i];
      if (was[to] == -1) {
        was[to] = was[v] + 1;
        p.push_back(to);
      }
    }
  }
  return was[0];
}
vector<int> wasdfs;
bool dfs(int v) {
  if (wasdfs[v] == 1) return true;
  if (wasdfs[v] == 2) return false;
  wasdfs[v] = 1;
  for (int i = (0); i < (g[v].size()); ++i) {
    int to = g[v][i];
    bool f = dfs(to);
    if (f) return true;
  }
  wasdfs[v] = 2;
  return false;
}
int dp[204 * 204];
int rec(int v) {
  if (g[v].size() == 0) return 0;
  if (dp[v] != -1) return dp[v];
  int res = 0;
  for (int i = (0); i < (g[v].size()); ++i) {
    int now = 1 + rec(g[v][i]);
    res = ((res < now) ? (now) : (res));
  }
  return dp[v] = res;
}
int main() {
  int h, t, r;
  scanf("%d%d%d", &h, &t, &r);
  int base = r + 1;
  int n;
  scanf("%d", &n);
  for (int i = (0); i < (n); ++i) {
    scanf("%d%d", &ifh[i].first, &ifh[i].second);
  }
  int m;
  scanf("%d", &m);
  for (int i = (0); i < (m); ++i) {
    scanf("%d%d", &ift[i].first, &ift[i].second);
  }
  g.resize(base * base);
  for (int i = (0); i < (r + 1); ++i) {
    for (int j = (0); j < (r + 1); ++j) {
      int v1 = i * base + j;
      for (int k = (0); k < (n); ++k) {
        if (k + 1 > i) break;
        int nh = i - k - 1 + ifh[k].first;
        int nt = j + ifh[k].second;
        if (nh + nt <= r) {
          int v2 = nh * base + nt;
          g[v1].push_back(v2);
        }
      }
      for (int k = (0); k < (m); ++k) {
        if (k + 1 > j) break;
        int nh = i + ift[k].first;
        int nt = j - k - 1 + ift[k].second;
        if (nh + nt <= r) {
          int v2 = nh * base + nt;
          g[v1].push_back(v2);
        }
      }
    }
  }
  int v = bfs(h * base + t);
  if (v != -1) {
    printf("Ivan\n%d\n", v);
    return 0;
  }
  wasdfs.resize(g.size(), 0);
  bool f = dfs(h * base + t);
  if (f) {
    printf("Draw\n");
    return 0;
  }
  memset(dp, -1, sizeof(dp));
  int res = rec(h * base + t);
  printf("Zmey\n%d\n", res + 1);
  return 0;
}
