#include <bits/stdc++.h>
using namespace std;
bool mark1[300][300], mark2[300][300], finish[300][300], dor;
int n, m, ma, R, head, tail, dis1[300][300], dis2[300][300], hh[300], ht[300],
    th[300], tt[300];
void bfs1() {
  queue<pair<pair<int, int>, int> > q;
  q.push(make_pair(make_pair(head, tail), 0));
  while (q.size()) {
    int he = q.front().first.first, ta = q.front().first.second,
        t = q.front().second;
    for (int i = 1; i <= min(n, he); i++) {
      int t1 = hh[i] - i + he, t2 = ht[i] + ta;
      if (R < t1 + t2) continue;
      if (!mark1[t1][t2]) {
        q.push(make_pair(make_pair(t1, t2), t + 1));
        dis1[t1][t2] = t + 1;
        mark1[t1][t2] = true;
      }
    }
    for (int i = 1; i <= min(m, ta); i++) {
      int t1 = th[i] + he, t2 = tt[i] - i + ta;
      if (R < t1 + t2) continue;
      if (!mark1[t1][t2]) {
        q.push(make_pair(make_pair(t1, t2), t + 1));
        dis1[t1][t2] = t + 1;
        mark1[t1][t2] = true;
      }
    }
    q.pop();
  }
}
void dfs(int he, int ta) {
  mark2[he][ta] = true;
  for (int i = 1; i <= min(n, he); i++) {
    int t1 = hh[i] - i + he, t2 = ht[i] + ta;
    if (R < t1 + t2) continue;
    if (!mark2[t1][t2])
      dfs(t1, t2);
    else if (!finish[t1][t2])
      dor = true;
  }
  for (int i = 1; i <= min(m, ta); i++) {
    int t1 = th[i] + he, t2 = tt[i] - i + ta;
    if (R < t1 + t2) continue;
    if (!mark2[t1][t2])
      dfs(t1, t2);
    else if (!finish[t1][t2])
      dor = true;
  }
  finish[he][ta] = true;
}
bool bfs2() {
  queue<pair<pair<int, int>, int> > q;
  q.push(make_pair(make_pair(head, tail), 0));
  while (q.size()) {
    int he = q.front().first.first, ta = q.front().first.second,
        t = q.front().second;
    for (int i = 1; i <= min(n, he); i++) {
      int t1 = hh[i] - i + he, t2 = ht[i] + ta;
      if (R < t1 + t2) continue;
      if (dis2[t1][t2] < t + 1) {
        q.push(make_pair(make_pair(t1, t2), t + 1));
        dis2[t1][t2] = t + 1;
      }
    }
    for (int i = 1; i <= min(m, ta); i++) {
      int t1 = th[i] + he, t2 = tt[i] - i + ta;
      if (R < t1 + t2) continue;
      if (dis2[t1][t2] < t + 1) {
        q.push(make_pair(make_pair(t1, t2), t + 1));
        dis2[t1][t2] = t + 1;
      }
    }
    q.pop();
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> head >> tail >> R >> n;
  for (int i = 1; i <= n; i++) cin >> hh[i] >> ht[i];
  cin >> m;
  for (int i = 1; i <= m; i++) cin >> th[i] >> tt[i];
  bfs1();
  if (mark1[0][0]) return cout << "Ivan\n" << dis1[0][0] << endl, 0;
  dfs(head, tail);
  if (dor) return cout << "Draw", 0;
  bfs2();
  for (int i = 0; i <= R; i++)
    for (int j = 0; j <= R - i; j++) ma = max(dis2[i][j], ma);
  cout << "Zmey\n" << ma + 1;
  return -0;
}
