#include <bits/stdc++.h>
using namespace std;
int const N = 4e2 + 13;
int const INF = 1e9 + 13;
string const Z = "Zmey";
string const D = "Draw";
string const I = "Ivan";
int w[N][N];
int a[N], b[N];
int h, t, r;
int n, m;
int c[N], d[N];
deque<pair<int, int>> q;
int dist[N][N];
bool dfs(int h, int t) {
  w[h][t] = 1;
  bool res = false;
  for (int i = 1; i <= min(h, n); ++i) {
    int nh = h + a[i] - i;
    int nt = t + b[i];
    if (nh + nt > r) continue;
    if (!w[nh][nt])
      res = max(res, dfs(nh, nt));
    else if (w[nh][nt] == 1)
      res = true;
  }
  for (int i = 1; i <= min(m, t); ++i) {
    int nh = h + c[i];
    int nt = t + d[i] - i;
    if (nh + nt > r) continue;
    if (!w[nh][nt])
      res = max(res, dfs(nh, nt));
    else if (w[nh][nt] == 1)
      res = true;
  }
  w[h][t] = 2;
  return res;
}
int was[N][N], dp[N][N];
int rec(int h, int t) {
  if (h + t > r) return 0;
  if (was[h][t]) return dp[h][t];
  was[h][t] = 1;
  int res = 0;
  for (int i = 1; i <= min(h, n); ++i) {
    int nh = h + a[i] - i;
    int nt = t + b[i];
    res = max(res, 1 + rec(nh, nt));
  }
  for (int i = 1; i <= min(m, t); ++i) {
    int nh = h + c[i];
    int nt = t + d[i] - i;
    res = max(res, 1 + rec(nh, nt));
  }
  return dp[h][t] = res;
}
void solve() {
  scanf("%d %d %d", &h, &t, &r);
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d %d", &a[i], &b[i]);
  scanf("%d", &m);
  for (int i = 1; i <= m; ++i) scanf("%d %d", &c[i], &d[i]);
  bool haveDraw = dfs(h, t);
  for (int i = 0; i < N; ++i)
    for (int j = 0; j < N; ++j) dist[i][j] = INF;
  dist[h][t] = 0;
  q.push_back(make_pair(h, t));
  while (q.size() > 0) {
    pair<int, int> cur = q.front();
    q.pop_front();
    int h = cur.first;
    int t = cur.second;
    for (int i = 1; i <= min(h, n); ++i) {
      int nh = h + a[i] - i;
      int nt = t + b[i];
      if (nh + nt > r) continue;
      if (dist[nh][nt] > dist[h][t] + 1) {
        dist[nh][nt] = dist[h][t] + 1;
        q.push_back(make_pair(nh, nt));
      }
    }
    for (int i = 1; i <= min(m, t); ++i) {
      int nh = h + c[i];
      int nt = t + d[i] - i;
      if (nh + nt > r) continue;
      if (dist[nh][nt] > dist[h][t] + 1) {
        dist[nh][nt] = dist[h][t] + 1;
        q.push_back(make_pair(nh, nt));
      }
    }
  }
  if (dist[0][0] != INF) {
    printf("%s\n%d\n", I.c_str(), dist[0][0]);
  } else {
    if (haveDraw) {
      printf("%s\n", D.c_str());
    } else {
      printf("%s\n", Z.c_str());
      printf("%d\n", rec(h, t));
    }
  }
}
int main() {
  solve();
  return 0;
}
