1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  4. #define endl "\n"
  5. #define int long long
  6.  
  7. const int N = 2e6 + 5;
  8.  
  9. int sum[N];
  10.  
  11. int32_t main()
  12. {
  13. IOS;
  14. for(int i = 1; i < N; i++)
  15. for(int j = 1; i * j < N; j++)
  16. sum[i * j] += i;
  17. int l1, r1, l2, r2;
  18. cin >> l1 >> r1 >> l2 >> r2;
  19. vector<int> v;
  20. for(int i = l2; i <= r2; i++)
  21. v.push_back(sum[i]);
  22. sort(v.begin(), v.end());
  23. int winA = 0, winB = 0;
  24. for(int i = l1; i <= r1; i++)
  25. {
  26. auto it = lower_bound(v.begin(), v.end(), sum[i]);
  27. if(it != v.begin())
  28. winA += (it - v.begin());
  29. winB += (v.end() - upper_bound(v.begin(), v.end(), sum[i]));
  30. }
  31. if(winA > winB)
  32. cout << "A";
  33. else if(winA == winB)
  34. cout << "Draw";
  35. else
  36. cout << "B";
  37. return 0;
  38. }