#include <bits/stdc++.h>   using namespace std;   const double EPS = 1e-9;   struct DDMY {     ostringstream o;     template <class T>     DDMY &operator,(const T &t) {       o << t <<  , ;       return *this;     }     string operator*() { return o.str().substr(0, o.str().size() - 1); }   };   template <class T>   std::ostream &operator<<(std::ostream &o, const std::vector<T> &v) {     o <<  [ ;     for (std::size_t i = 0; i < v.size(); i++)       o << v[i] << (i < v.size() - 1 ?  ,  :   );     return o <<  ] ;   }   template <class T, class U>   std::ostream &operator<<(std::ostream &o, const std::pair<T, U> &v) {     return o << v.first <<  :  << v.second;   }   template <class T, class U>   std::ostream &operator<<(std::ostream &o, const std::map<T, U> &v) {     o <<  { ;     typename std::map<T, U>::const_iterator i = v.begin(), j = i;     ++j;     for (; i != v.end(); ++i, ++j) o << *i << (j != v.end() ?  ,  :   );     return o <<  } ;   }   template <class T>   std::ostream &operator<<(std::ostream &o, const std::set<T> &v) {     o <<  { ;     typename std::set<T>::const_iterator i = v.begin(), j = i;     ++j;     for (; i != v.end(); ++i, ++j) o << *i << (j != v.end() ?  ,  :   );     return o <<  } ;   }   void error() {     cout << -1 << endl;     exit(0);   }   int main(int argc, char *argv[]) {     ios::sync_with_stdio(false);     int a1, a2, a3, a4;     cin >> a1 >> a2 >> a3 >> a4;     if (max(a3, a4) > a1 || max(a3, a4) > a2) {       error();     }     string line;     if (a3 >= a4) {       for (int i = 0; i < a3; i++) {         line +=  47 ;       }       a1 -= a3;       a2 -= a3;       a4 -= a3 - 1;       if (a1 < 0 || a2 < 0 || a4 < 0) {         error();       }       if (a4 == 1) {         if (a1 == 0) {           if (a2 > 0) {             line =  7  + line;             a2--;             if (a2 > 0) line += string(a2,  7 );           } else {             error();           }         } else {           line += string(a2,  7 );           line +=  4 ;           a1--;         }       } else if (a4 == 0) {         line += string(a2,  7 );       } else {         error();       }       if (a1 > 0) line = string(a1,  4 ) + line;     } else {       for (int i = 0; i < a4; i++) {         line +=  74 ;       }       a1 -= a4;       a2 -= a4;       a3 -= a4 - 1;       if (a1 < 0 || a2 < 0 || a4 < 0) {         error();       }       if (a3 == 0) {         if (a4 > 1) {           line = line.substr(0, line.size() - 2);           line = line.substr(2);           line =  7  + string(a1 + 1,  4 ) + line;           line += string(a2 + 1,  7 ) +  4 ;         } else if (a4 == 1) {           a1 += a4;           a2 += a4;           if (a2 > 0 && a1 > 0) {             line = string(a2,  7 ) + string(a1,  4 );           } else {             error();           }         } else if (a4 == 0) {           if (a1 == 0 || a2 == 0) {             if (a1 > 0) {               line = string(a1,  4 );             } else if (a2 > 0) {               line = string(a2,  7 );             }           } else {             error();           }         } else {           error();         }       } else {         error();       }     }     cout << line << endl;     return 0;   }