Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.

Petya loves long lucky numbers very much. He is interested in the minimum lucky number d that meets some condition. Let cnt(x) be the number of occurrences of number x in number d as a substring. For example, if d = 747747, then cnt(4) = 2, cnt(7) = 4, cnt(47) = 2, cnt(74) = 2. Petya wants the following condition to fulfil simultaneously: cnt(4) = a1, cnt(7) = a2, cnt(47) = a3, cnt(74) = a4. Petya is not interested in the occurrences of other numbers. Help him cope with this task.

Input

The single line contains four integers a1, a2, a3 and a4 (1 ≤ a1, a2, a3, a4 ≤ 106).

Output

On the single line print without leading zeroes the answer to the problem — the minimum lucky number d such, that cnt(4) = a1, cnt(7) = a2, cnt(47) = a3, cnt(74) = a4. If such number does not exist, print the single number "-1" (without the quotes).

Examples

Input

2 2 1 1


Output

4774


Input

4 7 3 1


Output

-1
import java.io.*;
import java.math.*;
import java.util.*;

/*
   author : Multi-Thread
*/
public class D {

	// static int INF = 998244353;
	static int INF = (int) 1e9 + 7;
	static int MAX = Integer.MAX_VALUE;
	static int MIN = Integer.MIN_VALUE;

	public static void main(String[] args) {

//		int test = fs.nextInt();
		int test = 1;

		for (int cases = 0; cases < test; cases++) {

//			solve();
			System.out.println(solve());

		}
	}

	static String solve() {
		int a = fs.nextInt(), b = fs.nextInt(), c = fs.nextInt(), d = fs.nextInt();
		if (Math.abs(c - d) > 1)
			return -1 + "";
		StringBuilder ans = new StringBuilder();
		if (c == d) {
			ans.append("47".repeat(c));
			ans.append("4");
		} else if (c > d) {
			ans.append("47".repeat(c));
		} else {
			ans.append("74".repeat(d));
		}
		int f = 0, s = 0;
		int sf = -1, es = 0;
//		System.out.println(ans);
		for (int i = 0; i < ans.length(); i++) {
			if (ans.charAt(i) == '4') {
				++f;
			}
			if (ans.charAt(i) == '7') {
				++s;
			}
		}
		boolean change = false;
		if (f > a || s > b) {
			if (f <= b && s <= a) {
				for (int i = 0; i < ans.length(); i++) {
					if (ans.charAt(i) == '4')
						ans.setCharAt(i, '7');
					else
						ans.setCharAt(i, '4');
				}
				int temp = s;
				s = f;
				f = temp;
				change = true;
			} else {
				return -1 + "";
			}
		}
		if (!change) {
			int reqdA = a - f;
			String zA = "4".repeat(reqdA);
			sf = -1;
			for (int i = 0; i < ans.length(); i++) {
				if (ans.charAt(i) == '4') {
					String z = ans.substring(0, i + 1) + zA;
					z += ans.substring(i + 1);
					ans.delete(0, ans.length());
					ans.append(z);
					break;
				}
			}
			int reqdS = b - s;
//		System.out.println(reqdS);
			String zB = "7".repeat(reqdS);
			for (int i = ans.length() - 1; i >= 0; i--) {
				if (ans.charAt(i) == '7') {
					String z = ans.substring(0, i + 1) + zB;
					z += ans.substring(i + 1);
					ans.delete(0, ans.length());
					ans.append(z);
					break;
				}
			}

		} else {
			int reqdA = a - f;
			String zA = "4".repeat(reqdA);
			sf = -1;
			for (int i = 0; i < ans.length(); i++) {
				if (ans.charAt(i) == '4') {
					String z = ans.substring(0, i + 1) + zA;
					z += ans.substring(i + 1);
					ans.delete(0, ans.length());
					ans.append(z);
					break;
				}
			}
			int reqdS = b - s;
//		System.out.println(reqdS);
			String zB = "7".repeat(reqdS);
			for (int i = ans.length() - 1; i >= 0; i--) {
				if (ans.charAt(i) == '7') {
					String z = ans.substring(0, i + 1) + zB;
					z += ans.substring(i + 1);
					ans.delete(0, ans.length());
					ans.append(z);
					break;
				}
			}
		}
		return ans.toString();
	}

	static int _min(int... ar) {
		intSort(ar, true);
		return ar[ar.length - 1];
	}

	static int _max(int... ar) {
		intSort(ar, true);
		return ar[ar.length - 1];
	}

	static void intSort(int[] a, boolean reverse) {
		ArrayList<Integer> al = new ArrayList<Integer>();
		for (int i : a)
			al.add(i);
		Collections.sort(al);
		if (reverse) {
			for (int i = 0; i < a.length; i++)
				a[i] = al.get(a.length - i - 1);
		} else {
			for (int i = 0; i < a.length; i++)
				a[i] = al.get(i);
		}
	}

	static void longSort(long[] a, boolean reverse) {
		ArrayList<Long> al = new ArrayList<>();
		for (long i : a)
			al.add(i);
		Collections.sort(al);
		if (reverse) {
			for (int i = 0; i < a.length; i++)
				a[i] = al.get(a.length - i - 1);
		} else {
			for (int i = 0; i < a.length; i++)
				a[i] = al.get(i);
		}
	}

	public static int[] radixSort(int[] f) {
		return radixSort(f, f.length);
	}

	public static int[] radixSort(int[] f, int n) {
		int[] to = new int[n];
		{
			int[] b = new int[65537];
			for (int i = 0; i < n; i++)
				b[1 + (f[i] & 0xffff)]++;
			for (int i = 1; i <= 65536; i++)
				b[i] += b[i - 1];
			for (int i = 0; i < n; i++)
				to[b[f[i] & 0xffff]++] = f[i];
			int[] d = f;
			f = to;
			to = d;
		}
		{
			int[] b = new int[65537];
			for (int i = 0; i < n; i++)
				b[1 + (f[i] >>> 16)]++;
			for (int i = 1; i <= 65536; i++)
				b[i] += b[i - 1];
			for (int i = 0; i < n; i++)
				to[b[f[i] >>> 16]++] = f[i];
			int[] d = f;
			f = to;
			to = d;
		}
		return f;
	}

	static class Pair {
		int first, second;

		public Pair(int first, int second) {
			this.first = first;
			this.second = second;
		}

		public String toString() {
			return "[" + first + "," + second + "]";
		}
	}

	static class LongPair {
		long first;
		long second;

		LongPair(long a, long b) {
			this.first = a;
			this.second = b;
		}

		public String toString() {
			return "[" + first + "," + second + "]";
		}
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void println() {
			writer.print("\n");
		}

		public void printLine(Object... objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}

	}

	private static final FastReader fs = new FastReader();
	private static final OutputWriter out = new OutputWriter(System.out);
}