#include <bits/stdc++.h>
using namespace std;
const int maxn = 205;
int H, T, R, n, m;
int head[maxn * maxn], deg[maxn * maxn], nxt[maxn * maxn * maxn],
    adj[maxn * maxn * maxn], total;
int dist[maxn * maxn], que[maxn * maxn], qc;
bool visited[maxn * maxn], instack[maxn * maxn];
inline void addedge(int u, int v) {
  ++total, adj[total] = v, nxt[total] = head[u], head[u] = total;
}
inline int encode(int x, int y) { return x * (R + 1) + y; }
void bfs(int u) {
  static queue<int> q;
  memset(dist, 0x3F, sizeof(dist));
  dist[u] = 0, q.push(u);
  while (!q.empty()) {
    int top = q.front();
    q.pop();
    for (int i = head[top]; i; i = nxt[i])
      if (dist[adj[i]] > dist[top] + 1) {
        dist[adj[i]] = dist[top] + 1;
        q.push(adj[i]);
      }
  }
}
void dfs_circle(int u) {
  instack[u] = visited[u] = true;
  for (int i = head[u]; i; i = nxt[i]) {
    ++deg[adj[i]];
    if (instack[adj[i]]) {
      printf("%s", "Draw");
      exit(0);
    }
    if (!visited[adj[i]]) dfs_circle(adj[i]);
  }
  instack[u] = false;
}
void toposort() {
  static queue<int> q;
  q.push(encode(H, T));
  while (!q.empty()) {
    int top = q.front();
    q.pop();
    que[++qc] = top;
    for (int i = head[top]; i; i = nxt[i])
      if ((--deg[adj[i]]) == 0) q.push(adj[i]);
  }
  memset(dist, 0, sizeof(dist));
  for (int i = 1; i <= qc; i++)
    for (int j = head[que[i]]; j; j = nxt[j])
      dist[adj[j]] = max(dist[adj[j]], dist[que[i]] + 1);
  printf("%s\n%d", "Zmey", dist[encode(R + 1, 0)]);
}
void dfs(int u) {
  visited[u] = true;
  for (int i = head[u]; i; i = nxt[i]) {
    if (visited[adj[i]]) {
      printf("%s", "Draw");
      exit(0);
    }
    if (dist[adj[i]] < dist[u] + 1) {
      dist[adj[i]] = dist[u] + 1;
      dfs(adj[i]);
    }
  }
  visited[u] = false;
}
int main() {
  scanf("%d%d%d", &H, &T, &R);
  scanf("%d", &n);
  for (int c1, c2, i = 1; i <= n; i++) {
    scanf("%d%d", &c1, &c2);
    for (int j = i; j <= R; j++)
      for (int k = 0; j + k <= R; k++) {
        if (j + k + c1 + c2 - i > R)
          addedge(encode(j, k), encode(R + 1, 0));
        else
          addedge(encode(j, k), encode(j - i + c1, k + c2));
      }
  }
  scanf("%d", &m);
  for (int c1, c2, i = 1; i <= m; i++) {
    scanf("%d%d", &c1, &c2);
    for (int j = 0; j <= R; j++)
      for (int k = i; j + k <= R; k++) {
        if (j + k + c1 + c2 - i > R)
          addedge(encode(j, k), encode(R + 1, 0));
        else
          addedge(encode(j, k), encode(j + c1, k - i + c2));
      }
  }
  bfs(encode(H, T));
  if (dist[encode(0, 0)] != 0x3F3F3F3F)
    printf("%s\n%d", "Ivan", dist[encode(0, 0)]);
  else {
    dfs_circle(encode(H, T));
    toposort();
  }
  return 0;
}
