#include <bits/stdc++.h>
int IntMaxVal = (int)1e20;
int IntMinVal = (int)-1e20;
long long LongMaxVal = (long long)1e20;
long long LongMinVal = (long long)-1e20;
using namespace std;
template <typename T>
struct argument_type;
template <typename T, typename U>
struct argument_type<T(U)> {};
template <typename T1, typename T2>
istream& operator>>(istream& is, pair<T1, T2>& s) {
  is >> s.first >> s.second;
  return is;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (int i = 0; i < v.size(); i++) os << v[i] << ' ';
  os << endl;
  return os;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& s, pair<T1, T2>& t) {
  s << t.first << ' ' << t.second;
  return s;
}
deque<string> strs;
void solve(char d1, char d2, int c1, int c2, int c12, int c21) {
  if (c21 > c12 || c12 > c21 + 1) return;
  if (c1 < 1 + c21) return;
  if (c2 < c12) return;
  if (c12 == 0 && c2 != 0) return;
  int extra1 = c1 - 1 - c21;
  int extra2 = c2 - c12;
  vector<char> s;
  for (int i = 0; i < 1 + c12 + c21; ++i) s.push_back(i % 2 ? d2 : d1);
  int i1 = -1;
  int i2 = -1;
  if (d1 == '4') {
    for (int i = 0; i < s.size(); ++i)
      if (s[i] == d1) {
        i1 = i;
        break;
      }
    for (int i = s.size() - 1; i >= 0; --i)
      if (s[i] == d2) {
        i2 = i;
        break;
      }
  } else {
    for (int i = 0; i < s.size(); ++i)
      if (s[i] == d2) {
        i2 = i;
        break;
      }
    for (int i = s.size() - 1; i >= 0; --i)
      if (s[i] == d1) {
        i1 = i;
        break;
      }
  }
  string res = "";
  for (int i = 0; i < s.size(); ++i) {
    res.push_back(s[i]);
    if (i == i1)
      for (int j = 0; j < extra1; ++j) res.push_back(d1);
    if (i == i2)
      for (int j = 0; j < extra2; ++j) res.push_back(d2);
  }
  strs.push_back(res);
}
int main() {
  srand(time(NULL));
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int cnt4;
  cin >> cnt4;
  ;
  int cnt7;
  cin >> cnt7;
  ;
  int cnt47;
  cin >> cnt47;
  ;
  int cnt74;
  cin >> cnt74;
  ;
  solve('4', '7', cnt4, cnt7, cnt47, cnt74);
  solve('7', '4', cnt7, cnt4, cnt74, cnt47);
  if (!strs.size())
    cout << -1;
  else {
    if (strs.size() > 1) {
      if (strs[0].length() < strs[1].length())
        strs.pop_back();
      else if (strs[0].length() > strs[1].length())
        strs.pop_front();
      else if (strs[0] < strs[1])
        strs.pop_back();
      else
        strs.pop_front();
    }
    cout << strs[0];
  }
}
