Professor Dumbledore is helping Harry destroy the Horcruxes. He went to Gaunt Shack as he suspected a Horcrux to be present there. He saw Marvolo Gaunt's Ring and identified it as a Horcrux. Although he destroyed it, he is still affected by its curse. Professor Snape is helping Dumbledore remove the curse. For this, he wants to give Dumbledore exactly x drops of the potion he made. 

Value of x is calculated as maximum of p·ai + q·aj + r·ak for given p, q, r and array a1, a2, ... an such that 1 ≤ i ≤ j ≤ k ≤ n. Help Snape find the value of x. Do note that the value of x may be negative.

Input

First line of input contains 4 integers n, p, q, r ( - 109 ≤ p, q, r ≤ 109, 1 ≤ n ≤ 105).

Next line of input contains n space separated integers a1, a2, ... an ( - 109 ≤ ai ≤ 109).

Output

Output a single integer the maximum value of p·ai + q·aj + r·ak that can be obtained provided 1 ≤ i ≤ j ≤ k ≤ n.

Examples

Input

5 1 2 3
1 2 3 4 5


Output

30


Input

5 1 2 -3
-1 -2 -3 -4 -5


Output

12

Note

In the first sample case, we can take i = j = k = 5, thus making the answer as 1·5 + 2·5 + 3·5 = 30.

In second sample case, selecting i = j = 1 and k = 5 gives the answer 12.
import java.util.*;
import java.lang.*;
import java.io.*;
public class Codechef
{   static PrintWriter out=new PrintWriter(System.out);
	static FastScanner in = new FastScanner(System.in);
     static class FastScanner {
        BufferedReader br;
        StringTokenizer stok;
        FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }
        String next() throws IOException {
            while (stok == null || !stok.hasMoreTokens()) {
                String s = br.readLine();
                if (s == null) {
                    return null;
                }
                stok = new StringTokenizer(s);
            }
            return stok.nextToken();
        }
        int ni() throws IOException {
            return Integer.parseInt(next());
        }
        long nl() throws IOException {
            return Long.parseLong(next());
        }
        double nd() throws IOException {
            return Double.parseDouble(next());
        }
        char nc() throws IOException {
            return (char) (br.read());
        }
        String ns() throws IOException {
            return br.readLine();
        }
        int[] nia(int n) throws IOException{
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        long[] nla(int n) throws IOException {
            long a[] = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nl();
            return a;
        }
        double[] nda(int n)throws IOException {
            double a[] = new double[n];
            for (int i = 0; i < n; i++)
                a[i] = nd();
            return a;
        }
        int [][] imat(int n,int m) throws IOException
        {   int mat[][]=new int[n][m];
            for(int i=0;i<n;i++)
            {   for(int j=0;j<m;j++)
                   mat[i][j]=ni();
            }
            return mat;
        }
    }
    
    ///     PRINTING FUNCTIONS
    
    static void pia(int arr[]) throws IOException
        {   for(int i=0;i<arr.length;i++)
                out.print(arr[i]+" ");
            out.println();
        }
    static void pla(long arr[]) throws IOException
        {   for(int i=0;i<arr.length;i++)
                out.print(arr[i]+" ");
            out.println();
        }
    static void pimat(int mat[][])
        {   for(int i=0;i<mat.length;i++)
            {   for(int j=0;j<mat[0].length;j++)
                    out.print(mat[i][j]);
            out.println();
        }
    }
        
    ///MAIN METHOD
    
    
    
    
	static long mod=Long.MAX_VALUE;
	public static void main (String[] args) throws java.lang.Exception
	{   int i,j;
	    HashMap<Integer,Integer> hm=new HashMap<Integer,Integer>();
		/*  if(hm.containsKey(z))
		        hm.put(z,hm.get(z)+1);
		    else
		        hm.put(z,1);
		 */       
        ArrayList<Integer> arr=new ArrayList<Integer>();
        HashSet<String> set=new HashSet<String>();
        PriorityQueue<Integer> pq=new PriorityQueue<Integer>();
        /*  int n = in.ni();
            int m = in.ni();
            String s=in.ns();
            int a[]=in.nia(n);
            int b[][]=in.im(n,m);
            pia(a);
		    pimat(b);
		
        */
        int n=in.ni();
        long p=in.nl();
        long q=in.nl();
        long r=in.nl();
        long a[]=in.nla(n);
        long b[]=new long[n];
        
        long temp3[]=new long[n];
        long temp1[]=new long[n];
        
        long flag1=0,flag2=0;
        long max=Long.MIN_VALUE;
        temp3[n-1]=r*a[n-1];
        temp1[0]=p*a[0];
        for(i=n-2;i>=0;i--)
            temp3[i]=Math.max(r*a[i],temp3[i+1]);
        for(i=1;i<=n-1;i++)
            temp1[i]=Math.max(p*a[i],temp1[i-1]);
        for(i=0;i<=n-1;i++)
            max=Math.max(temp1[i]+temp3[i]+q*a[i],max);
        out.println(max);
        
        
        out.close();
	}
	
	
	
	
	
	static long gcd(long a,long b)
	{   if(b==0)
	        return a;
	    return gcd(b,a%b);    
	}
	static long exponent(long a,long n)
	{   long ans=1;
	    while(n!=0)
	    {   if(n%2==0)
	            ans=(ans*a)%mod;
	       a=(a*a)%mod;
	       n=n>>1;
	    }
	    return ans;
	}
	static int binarySearch(int a[], int item, int low, int high) 
    {   if (high <= low) 
            return (item > a[low])?  (low + 1): low; 
        int mid = (low + high)/2; 
        if(item == a[mid]) 
            return mid+1; 
        if(item > a[mid]) 
            return binarySearch(a, item, mid+1, high); 
        return binarySearch(a, item, low, mid-1); 
    } 
}