#include <bits/stdc++.h>
using namespace std;
int h, t, r, n, m;
const int NN = 5e4, N = 201;
vector<int> mark(NN, 0);
vector<int> ff(NN, -1);
vector<pair<int, int> > moves;
vector<int> mi;
vector<int> mj;
int change(int x, int y) { return x * N + y + 1; }
pair<int, int> change2(int v) {
  if (v % N == 0) return make_pair(v / N - 1, N - 1);
  return make_pair(v / N, v % N - 1);
}
bool win = 0, lose = 0, cycle = 0;
int mwin = 1e8, mlose = 0;
int bfs(int v) {
  if (v == 1) return 0;
  queue<int> q, d;
  q.push(v);
  d.push(0);
  vector<int> mark3(NN, 0);
  while (q.size()) {
    v = q.front();
    int dd = d.front();
    int x = change2(v).first;
    int y = change2(v).second;
    q.pop();
    d.pop();
    mark3[v - 1] = 1;
    mlose++;
    if (mlose % 100000 == 0) cout << mlose << endl;
    for (int i = 0; i < moves.size(); i++) {
      int i1 = 0, i2 = 0;
      if (i < n)
        i1 = mi[i];
      else
        i2 = mj[i - n];
      int new_x = x + moves[i].first;
      int new_y = y + moves[i].second;
      if (i1 <= x && y >= i2) {
        int u = change(new_x, new_y);
        if (u == 1)
          return dd + 1;
        else if (new_x + new_y <= r) {
          if (!mark3[u - 1]) {
            q.push(u);
            d.push(dd + 1);
            mark3[u - 1] = 1;
          }
        }
      }
    }
  }
  return -1;
}
int dfs(int v, int d) {
  if (v == 1) return win = 1, mwin = min(mwin, d + 1), 0;
  int x = change2(v).first;
  int y = change2(v).second;
  if (x + y > r) return lose = 1, ff[v - 1] = 0;
  mark[v - 1] = 1;
  for (int i = 0; i < moves.size(); i++) {
    int i1 = 0, i2 = 0;
    if (i < n)
      i1 = mi[i];
    else
      i2 = mj[i - n];
    int new_x = x + moves[i].first;
    int new_y = y + moves[i].second;
    if (i1 <= x && y >= i2) {
      int u = change(new_x, new_y);
      if (u == 1) {
        win = 1, mwin = min(mwin, d + 1);
      } else {
        if (new_x + new_y > r) {
          lose = 1, mlose = max(mlose, d + 1);
          if (ff[v - 1] == -1) {
            ff[v - 1] = 1;
          }
        } else if (mark[u - 1]) {
          cycle = 1;
          return 0;
        } else {
          bool cd = 0;
          if (ff[u - 1] == -1) cd = dfs(u, d + 1);
          if (win) {
          } else {
            if (ff[u - 1] != -1) ff[v - 1] = max(ff[v - 1], ff[u - 1] + 1);
          }
        }
      }
    }
  }
  mark[v - 1] = 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int i, j;
  cin >> h >> t >> r;
  cin >> n;
  int x, y;
  for (i = 0; i < n; i++)
    cin >> x >> y, moves.push_back(make_pair(x - i - 1, y)),
        mi.push_back(i + 1);
  cin >> m;
  for (i = 0; i < m; i++)
    cin >> x >> y, moves.push_back(make_pair(x, y - i - 1)),
        mj.push_back(i + 1);
  int w = bfs(change(h, t));
  if (w != -1)
    cout << "Ivan" << endl << w;
  else {
    dfs(change(h, t), 0);
    if (cycle)
      cout << "Draw";
    else {
      cout << "Zmey" << endl << ff[change(h, t) - 1];
    }
  }
  return 0;
}
