#include<bits/stdc++.h>
#define ll                  long long
#define dl                 long double
#define pb                push_back
#define F                  first
#define S                  second
#define endl              "\n"
#define rep(i,a,b)       for(i=a;i<b;i++)
#define all(v)             v.begin(),v.end()
#define allr(v)            v.rbegin(),v.rend()
#define mod              1000000007LL
#define CIN(V,s,n)      for(int i=s;i<n;i++){cin >> V[i];}
#define COUT(V,s,n)   {for(int i=s;i<n;i++){cout <<  V[i] << " "  ;} cout << endl;}
#define fast               ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define CLEAR(V);      for(ll i=0;i<V.size();i++) V[i] = 0;
#define N                  1000001LL
#define tmod             998244353LL
using namespace std;

bool sBs(const pair<int,int> &a,const pair<int,int> &b)
{   return (a.second < b.second);   }

ll Powb(ll b,ll n,ll m);
ll BS(vector<pair< ll ,ll > > &PS,ll s,ll e,ll ser);
ll MI(ll a, ll m);
ll P[N+1];
void Sieve(int n=N);

int main()
{
fast;
ll q=1,t;
//cin >> q; t = q;
while(q--)
{
    ll i,j,n,m,k,l=0,r=0,a=0,b=0,c=0,d=0,e,g=1,p,u,v,w,x,y,z,flag=1;
    //n=m=k=i=j=l=r=a=b=c=d=u=v=w=p=x=y=0;
    string s;
    cin >> s;
    n = s.size();
    for(i=0;i<n;i++) {
        if (i%2==0) {
            if (s[i] - 'A' < 26 and s[i] - 'A' >= 0)
            {
                flag = 0; break;
            }
        } else {
            if (s[i] - 'a' < 26 and s[i] - 'a' >= 0)
            {
                flag = 0; break;
            }
        }
    }

    if (flag) cout << "Yes";
    else cout << "No";
}
    return 0;
}

//*****************************************************************************************************************************************

ll Powb(ll b,ll n,ll m)
{
    if(n==0) return 1LL;
    if(n==1) return b;
    ll temp = Powb(b,n/2,m);
    if(n%2==0){return (temp*temp)%m;}
    else{return (b*((temp*temp)%m))%m;}
}

ll BS(vector<pair<ll,ll> > &PS,ll s,ll e,ll ser)
{
    if(s>e)
        return s;
    ll mid = (s+e)/2;
    if(PS[mid].F==ser)
    {
        return mid;
    }
    else if(PS[mid].F > ser)
    {
        return BS(PS,s,mid-1,ser);
    }
    else
        return BS(PS,mid+1,e,ser);
}
ll MI(ll a, ll m)
{
    ll m0 = m;
    ll y = 0, x = 1;
    if (m == 1)
      return 0;
    while (a > 1)
    {
        ll q = a / m;
        ll t = m;
        m = a % m, a = t;
        t = y;
        y = x - q * y;
        x = t;
    }
    if (x < 0)
       x += m0;
    return x;
}

void Sieve(int n)
{
    //memset(P,1,sizeof(P));
    P[0] = 0;
    P[1]= 0;
    for(int i=2;i<=n;i++) P[i] = 1;
    for(ll i=2;i*i<=n;i++)
    {
        if(P[i]==1)
        {
            for(ll j=i*i;j<=n;j+=i)
            {
                P[j]=0;
            }
        }
    }

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,i,e,j;
 //e=1;;
 //while(e--)
 {
	  
	 cin>>n;
	 long a[n],b[n],c[n],max,d;
	 for(i=0;i<n;i++)
	 cin>>a[i];
	 for(i=0;i<n;i++)
	 cin>>b[i];
	 c[0]=0;
	  max=a[0];
	 for(i=1;i<n;i++)
	 {
		 if(a[i]>max)
		 {
			 max=a[i];
			 c[i]=i;
		 }
		 else
		 c[i]=c[i-1];
	 }
	// for(i=0;i<n;i++)
	// cout<<c[i]<<" ";
	  long long dp[n];
	 dp[0]=a[0]*b[0];
	 for(i=1;i<n;i++)
	 {
		 dp[i]=dp[i-1];
		 long long t=a[c[i]]*b[i];
	     if(dp[i]<t)
		 dp[i]=t;
		 
	 }
	 for(i=0;i<n;i++)
	 cout<<dp[i]<<"\n";
 }
}