#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 * 1000 + 10, maxm = 10 * 1000;
vector<int> g[maxn], nn, mm, bf;
int dis[maxn], h, t, r, n, m, f[maxn];
bool mark[maxn], cc;
void dfs(int v) {
  f[v] = 1;
  for (__typeof(int(g[v].size())) i = 0; i < (int(g[v].size())); i++) {
    int u = g[v][i];
    if (f[u] == 1) cc = true;
    if (f[u] == 0) dfs(u);
    dis[v] = max(dis[v], dis[u]);
  }
  dis[v]++;
  f[v] = 2;
}
void bfs(int v) {
  mark[v] = 1;
  dis[v] = 0;
  bf.push_back(v);
  for (__typeof(int(bf.size())) i = 0; i < (int(bf.size())); i++) {
    int u = bf[i];
    for (__typeof(n) i = 0; i < (n); i++) {
      if (u / 1000 >= i + 1) {
        g[u].push_back((nn[i] / 1000 + u / 1000 - i - 1) * 1000 + nn[i] % 1000 +
                       u % 1000);
        if (nn[i] / 1000 + u / 1000 - i - 1 + nn[i] % 1000 + u % 1000 <= r &&
            !mark[(nn[i] / 1000 + u / 1000 - i - 1) * 1000 + nn[i] % 1000 +
                  u % 1000])
          bf.push_back((nn[i] / 1000 + u / 1000 - i - 1) * 1000 + nn[i] % 1000 +
                       u % 1000);
        if (!mark[(nn[i] / 1000 + u / 1000 - i - 1) * 1000 + nn[i] % 1000 +
                  u % 1000])
          dis[(nn[i] / 1000 + u / 1000 - i - 1) * 1000 + nn[i] % 1000 +
              u % 1000] = dis[u] + 1;
        mark[(nn[i] / 1000 + u / 1000 - i - 1) * 1000 + nn[i] % 1000 +
             u % 1000] = 1;
      } else
        break;
    }
    for (__typeof(m) i = 0; i < (m); i++) {
      if (u % 1000 >= i + 1) {
        g[u].push_back((mm[i] / 1000 + u / 1000) * 1000 + mm[i] % 1000 +
                       u % 1000 - i - 1);
        if (mm[i] / 1000 + u / 1000 - i - 1 + mm[i] % 1000 + u % 1000 <= r &&
            !mark[(mm[i] / 1000 + u / 1000) * 1000 - i - 1 + mm[i] % 1000 +
                  u % 1000])
          bf.push_back((mm[i] / 1000 + u / 1000) * 1000 + mm[i] % 1000 +
                       u % 1000 - i - 1);
        if (!mark[(mm[i] / 1000 + u / 1000) * 1000 + mm[i] % 1000 + u % 1000 -
                  i - 1])
          dis[(mm[i] / 1000 + u / 1000) * 1000 + mm[i] % 1000 + u % 1000 - i -
              1] = dis[u] + 1;
        mark[(mm[i] / 1000 + u / 1000) * 1000 + mm[i] % 1000 + u % 1000 - i -
             1] = 1;
      } else
        break;
    }
  }
}
int main() {
  int a, b;
  cin >> h >> t >> r >> n;
  for (__typeof(n) i = 0; i < (n); i++) {
    cin >> a >> b;
    if (a > 200 || b > 200)
      nn.push_back(200200);
    else
      nn.push_back(a * 1000 + b);
  }
  cin >> m;
  for (__typeof(m) i = 0; i < (m); i++) {
    cin >> a >> b;
    if (a > 200 || b > 200)
      mm.push_back(200200);
    else
      mm.push_back(a * 1000 + b);
  }
  bfs(h * 1000 + t);
  if (dis[0] != 0)
    cout << "Ivan" << endl << dis[0] << endl;
  else {
    memset((dis), (0), sizeof(dis));
    ;
    dfs(h * 1000 + t);
    if (cc)
      cout << "Draw" << endl;
    else
      cout << "Zmey" << endl << dis[h * 1000 + t] - 1 << endl;
  }
}
