#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 203 * 203 + 200, INF = 1 << 25;
int __count__;
template <class t>
ostream &operator<<(ostream &tout, const vector<t> &s) {
  tout << '[';
  for (int i = 0; i < s.size(); i++)
    if (i + 1 == s.size())
      tout << s[i];
    else
      tout << s[i] << ',';
  tout << ']';
  return (tout);
}
vector<int> e[MAX_N], re[MAX_N], sorted, Glo;
vector<vector<int> > ans;
bool mark[MAX_N];
struct StronglyConnected {
  int n;
  StronglyConnected(int s) {
    n = s;
    for (int i = 0; i < MAX_N; i++) {
      e[i].clear();
      mark[i] = false;
      re[i].clear();
    }
    sorted.clear();
    ans.clear();
  }
  inline void dfs(int s) {
    if (mark[s]) return;
    mark[s] = true;
    Glo.push_back(s);
    for (int i = 0; i < e[s].size(); i++) dfs(e[s][i]);
    sorted.push_back(s);
  }
  inline void push_back(int a, int b) { e[a].push_back(b); }
  vector<vector<int> > Components() {
    for (int i = 1; i <= n; i++)
      if (!mark[i]) dfs(i);
    reverse(sorted.begin(), sorted.end());
    for (int i = 1; i <= n; i++)
      for (int j = 0; j < e[i].size(); j++) re[e[i][j]].push_back(i);
    for (int i = 1; i <= n; i++) swap(e[i], re[i]);
    vector<vector<int> > ans;
    fill(mark + 1, mark + n + 1, false);
    for (int i = 1; i <= n; i++)
      if (!mark[sorted[i - 1]]) {
        Glo.clear();
        dfs(sorted[i - 1]);
        ans.push_back(Glo);
      }
    return (ans);
  }
};
vector<vector<int> > __fuck__;
vector<int> qu;
vector<int> dist;
template <typename type>
vector<pair<type, int> > bfs(vector<pair<type, type> > yal, type s) {
  __fuck__ = vector<vector<int> >(__count__ + 1);
  for (int i = 0; i < yal.size(); i++)
    __fuck__[yal[i].first].push_back(yal[i].second);
  dist = vector<int>(__count__ + 1, INF);
  qu.push_back(s);
  dist[s] = 0;
  vector<pair<type, int> > ans;
  for (int first = 0; first < qu.size(); first++) {
    ans.push_back(pair<type, int>(qu[first], dist[qu[first]]));
    type x = qu[first];
    for (int i = 0; i < __fuck__[x].size(); i++)
      if (dist[__fuck__[x][i]] == INF) {
        dist[__fuck__[x][i]] = dist[x] + 1;
        qu.push_back(__fuck__[x][i]);
      }
  }
  return (ans);
}
vector<pair<int, int> > res;
int main() {
  int h, r, t, n, m;
  cin >> h >> t >> r;
  cin >> n;
  vector<pair<int, int> > head, tail;
  for (int i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    head.push_back(pair<int, int>(x, y));
  }
  cin >> m;
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    tail.push_back(pair<int, int>(x, y));
  }
  vector<vector<int> > number(r + 1, vector<int>(r + 1));
  __count__ = 1;
  for (int i = 0; i < number.size(); i++)
    for (int j = 0; j < number[i].size(); j++, __count__++)
      number[i][j] = __count__;
  vector<pair<int, int> > edges;
  for (int i = 0; i < number.size(); i++)
    for (int j = 0; j < number[i].size(); j++)
      if (i + j <= r && i + j > 0) {
        for (int a = 0; a < head.size() && a < i; a++) {
          int x = i - a - 1 + head[a].first;
          int y = j + head[a].second;
          if (x + y <= r)
            edges.push_back(pair<int, int>(number[i][j], number[x][y]));
          else
            edges.push_back(pair<int, int>(number[i][j], __count__));
        }
        for (int a = 0; a < tail.size() && a < j; a++) {
          int x = i + tail[a].first;
          int y = j - a - 1 + tail[a].second;
          if (x + y <= r)
            edges.push_back(pair<int, int>(number[i][j], number[x][y]));
          else
            edges.push_back(pair<int, int>(number[i][j], __count__));
        }
      }
  int start = number[h][t];
  res = bfs(edges, start);
  for (int i = 0; i < res.size(); i++)
    if (res[i].first == 1) {
      cout << "Ivan" << endl;
      cout << res[i].second << endl;
      return (0);
    }
  StronglyConnected mai(__count__);
  for (int i = 0; i < edges.size(); i++)
    mai.push_back(edges[i].first, edges[i].second);
  vector<vector<int> > faces = mai.Components();
  vector<int> places(__count__ + 1);
  for (int i = 0; i < faces.size(); i++)
    for (int j = 0; j < faces[i].size(); j++) places[faces[i][j]] = i;
  vector<vector<int> > e(faces.size());
  for (int i = 0; i < edges.size(); i++)
    e[places[edges[i].first]].push_back(places[edges[i].second]);
  vector<int> Max(faces.size(), -INF);
  for (int i = 0; i < faces.size(); i++)
    for (int j = 0; j < faces[i].size(); j++)
      if (faces[i][j] == start) Max[i] = 0;
  for (int i = 0; i < e.size(); i++)
    for (int j = 0; j < e[i].size(); j++)
      Max[e[i][j]] = max(Max[e[i][j]], Max[i] + 1);
  for (int i = 0; i < faces.size(); i++)
    if (Max[i] >= 0 && faces[i].size() > 1) {
      cout << "Draw" << endl;
      return (0);
    }
  for (int i = 0; i < Max.size(); i++)
    if (Max[i] >= 0) {
      bool find = false;
      for (int j = 0; j < e[i].size(); j++)
        if (e[i][j] == i) find = true;
      if (find) {
        cout << "Draw" << endl;
        return (0);
      }
    }
  for (int i = 0; i < faces.size(); i++)
    for (int j = 0; j < faces[i].size(); j++)
      if (faces[i][j] == __count__) {
        cout << "Zmey" << endl;
        cout << Max[i] << endl;
        return (0);
      }
}
