Problem: The fearless Ikta has finally hunted down the infamous Count Big Bridge! Count Bigbridge is now trapped in a rectangular room w meters wide and h meters deep, waiting for his end.

If you select a corner of the room and take the coordinate system so that the width direction is the x-axis and the depth direction is the y-axis, and the inside of the room is in the positive direction, Count Big Bridge is at the point (p, q). .. At point (x, y), there is a shock wave launcher, which is Ikta's ultimate weapon, from which a shock wave of v meters per second is emitted in all directions. This shock wave is valid for t seconds and is reflected off the walls of the room.

Ikta, who is outside the room, wants to know how much Count Big Bridge will suffer, so let's write a program that asks Count Big Bridge how many shock waves he will hit. At this time, if the shock wave hits the enemy from the n direction at the same time, it is considered to have hit the enemy n times, and it is also effective if the shock wave hits the enemy exactly t seconds later. The shock wave does not disappear due to obstacles such as the launcher itself and Count Big Bridge, and the shock waves do not interfere with each other.



Input

The input is given in the following format.

> w h v t x y p q
>

* Each is a positive integer as explained in the problem statement.



Constraints

* v × t ≤ 106
* 2 ≤ w, h ≤ 108
* 0 <x, p <w
* 0 <y, q <h
* (x, y) ≠ (p, q)

Output

Output the number of times the shock wave hits Count Big Bridge on one line.

Examples

Input

10 10 1 10 3 3 7 7


Output

1


Input

10 10 1 11 3 3 7 7


Output

5


Input

2 3 1000 1000 1 1 1 2


Output

523598775681

Solution (in CPP):

Solution:
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef complex<double> P;
typedef pair<P,P> L;

const double EPS = 1e-9;

double dot( P a, P b ){ return a.real()*b.real() + a.imag() * b.imag(); }

//???
struct Circle{
  P c; //?????????
  double r; //??????
  Circle(P c=P(0,0), double r=0):c(c),r(r){}
};
//?°???±
P proj(P p, L l){
  return l.first + dot(p - l.first, l.second - l.first) / norm(l.second - l.first) * (l.second - l.first);
}
ll W,H,V,T,X,Y,p,q;

//?????¨??´????????????
vector<P> getIntersectCL(Circle c, L l){
  vector<P> res;
  P h = proj(c.c, l);
  double d = abs(c.c - h);
  if(d > c.r + EPS);
  else if(d > c.r - EPS) res.push_back(h);
  else{
    P v = l.second - l.first;
    v = (sqrt(c.r*c.r - d*d) / abs(v)) * v;
    res.push_back(h+v);
    res.push_back(h-v);
  }
  return res;
}


int getRevBit( double x, double y){
  int ret = 0;
  if( (ll)(abs(y)) / H % 2 == 1 ) ret |= 1;//tate
  if( (ll)(abs(x)) / W % 2 == 1 ) ret |= 2;//yoko
  return ret;
}

P getPosfromBit( int bit ) {
  double x=p,y=q;
  if( bit & 1 ) y = H - y;
  if( bit & 2 ) x = W - x;
  //cout << bitset<3>(bit) << " "<< x << ", " << y << endl;
  return P(x,y);
}

P getPosfromFie( P sp ){
  //cout << "getPosformFie " << sp << endl;
  int bit = getRevBit( sp.real(), sp.imag() );
  P p = getPosfromBit( bit );  
  ll mx = (ll)sp.real()/W*W;
  ll my = (ll)sp.imag()/H*H;
  //cout << mx << " "<< my << endl;
  p = P( p.real() + mx, p.imag() + my );
  return p;  
}

bool inCircle( P p , Circle c ){
  //cout << p << " " << c.c << " " << c.r << endl;
  // cout << abs(p-c.c) << " " << c.r << endl;
  if( norm( p-c.c ) < c.r*c.r  + EPS ) return true;
  return false;
}

ll getInCircle( P sp, P ep, double mx, double my ){
  //cout << "getIncircle " << sp << " "<< ep << " " << mx << " " << my << endl;
  ll ret=0;
  while(true){
    P kx = sp;
    if( mx > 0 )
      kx = P( ep.real(), sp.imag() );
    if( my < 0 ) {
      kx = P( kx.real(), kx.imag() + my );
      if( ep.imag() > sp.imag() ) break;
    } else {
      if( ep.imag() < sp.imag() ) break;
    }
    P tp = getPosfromFie( kx );
    // cout << "tp : " << tp << endl;
    if( inCircle( tp, Circle( P(X,Y), V*T ) ) ) ret++;
    sp = P( sp.real(), sp.imag() + my );
  }
  return ret;
}


ll solve(L now, double mx,Circle c){
  ll ret = 0;
  while(true){
    L nex = now;    
    //  cout << now.first << " " << now.second << " "<< mx <<  endl;    
    nex.first = P( nex.first.real()+mx, nex.first.imag() );
    nex.second = P( nex.second.real()+mx, nex.second.imag() );
    
    vector<P> vg = getIntersectCL( c, now );
    if( vg.size() < 2 ) break;
    if( vg[0].imag() < vg[1].imag() ) swap( vg[0], vg[1] );
    
    vector<P> hg = getIntersectCL( c, nex );
    if( hg.size() < 2 )
      hg = vector<P>( 2, P(nex.first.real(),0) );
    else {
      if( hg[0].imag() < hg[1].imag() ) swap( hg[0],hg[1] );
      ll y0 = (ll)hg[0].imag()/H; 
      ll y1 = (ll)hg[1].imag()/H;
      ret += abs(y0) + abs(y1);
      y0 *= H; y1 *= H;
      hg[0] = P( hg[0].real(), y0 );
      hg[1] = P( hg[1].real(), y1 );
    }
    
    //sy1 -> vg[0].imag()
    ret += getInCircle( hg[0], vg[0], mx, H );
    //sy2 -> vg[1].imag()
    ret += getInCircle( hg[1], vg[1], mx, -H );

    now = nex;
  }
  return ret;
}

ll solve(L now, Circle c){
  ll ret = 0;
  L nex = L( P( now.first.real()+W, now.first.imag() ),
             P( now.second.real()+W, now.second.imag() ) );
  
  vector<P> vg = getIntersectCL( c, now );
  if( vg.size() < 2 )
    vg = vector<P>( 2, P(nex.first.real(),0) );
  if( vg[0].imag() < vg[1].imag() ) swap( vg[0], vg[1] );
  
  vector<P> hg = getIntersectCL( c, nex );
  if( hg.size() < 2 )
    hg = vector<P>( 2, P(nex.first.real(),0) );
  else 
    if( hg[0].imag() < hg[1].imag() ) swap( hg[0],hg[1] );  
  ll y0 = (ll)min(vg[0].imag(),hg[0].imag())/H; 
  ll y1 = (ll)max(vg[1].imag(),hg[1].imag())/H;
  if( y0!=y1 )
    ret += abs(y0) + abs(y1);
  //  cout <<y0 <<" " << y1 << endl;
  y0 *= H; y1 *= H;
  //sy1 -> vg[0].imag()
  ret += getInCircle( P(0,y0), P(W,Y+c.r), -1.0, H );  
  //sy2 -> vg[1].imag()
  ret += getInCircle( P(0,y1), P(W,Y-c.r), -1.0, -H );  
  return ret;
}

int main(){
  cin >> W >> H >> V >> T >> X >> Y >> p >> q;
  Circle c = Circle( P(X,Y), V*T );
  ll res = solve(L(P(0,0),P(0,H)), -W, c) + solve(L(P(W,0),P(W,H)), W, c);
  res += solve(L(P(0,0),P(0,H)),c);
  cout << res << endl;
}