#include <bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
const int maxnn = 4e5 + 7;
const long long mod = 1e9 + 7;
const long long inf = 1e18;
long long fun(long long x1, long long y1, long long x2, long long y2) {
  return abs(x1 - x2) + abs(y1 - y2);
}
int check(long long a, long long b, long long c, long long d, long long i,
          long long n) {
  if ((c * (n - i - 1) - i * d) <= (b - a) &&
      (b - a) <= (d * (n - i - 1) - i * c))
    return 1;
  else
    return 0;
}
long long ksm(long long a, long long b) {
  long long ans = 1ll;
  while (b) {
    if (b & 1) ans = (a * ans) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return ans % mod;
}
long long C(long long n, long long m) {
  if (m == 0ll) return 1ll;
  if (n < m) return 0ll;
  if (m < 0ll) return 0ll;
  if (n == m) return 1ll;
  long long ans = 1ll;
  for (long long i = 0; i < m; i++) {
    ans = ans * (n - i) % mod;
    ans = ans * ksm(i + 1ll, mod - 2ll) % mod;
  }
  return ans % mod;
}
void getnxt(string s) {
  int nxt[10];
  int j = 0, k = -1;
  nxt[0] = -1;
  int len = s.size();
  while (j < len) {
    if (k == -1 || s[j] == s[k]) {
      nxt[++j] = ++k;
    } else {
      k = nxt[k];
    }
  }
  for (int i = 1; i <= len; i++) {
    printf("%d %d\n", i, nxt[i]);
  }
  return;
}
string Manacher(string s) {
  long long ans = 0ll;
  long long n = (long long)s.size();
  ans = (n - 1ll) * n / 2ll;
  long long temp = 0ll;
  string t = "$#";
  for (int i = 0; i < s.size(); i++) {
    t += s[i];
    t += "#";
  }
  vector<int> p(t.size(), 0);
  int mx = 0, id = 0, reCenter = 0, reLen = 0;
  for (int i = 1; i < t.size(); i++) {
    p[i] = mx > i ? min(mx - i, p[2 * id - i]) : 1;
    while (t[i + p[i]] == t[i - p[i]]) p[i]++;
    if (i + p[i] > mx) {
      mx = i + p[i];
      id = i;
    }
    if (p[i] > reLen) {
      reLen = p[i];
      reCenter = i;
    }
    if (p[i] > 2ll) {
      temp += p[i] - 2ll;
      printf("%c %d\n", t[i], p[i]);
    }
  }
  ans -= temp;
  cout << ans + 1ll << endl;
  return s.substr((reCenter - reLen) / 2, reLen - 1);
}
struct jz {
  long long a[2][2];
  jz() { memset(a, 0ll, sizeof(a)); }
};
jz jzcf(jz x, jz y) {
  jz ans;
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      for (int k = 0; k < 2; k++)
        ans.a[i][j] = (ans.a[i][j] + (x.a[i][k] * y.a[k][j] % mod)) % mod;
  return ans;
}
jz jzksm(jz temp, long long b) {
  jz ans;
  ans.a[0][0] = 1;
  while (b) {
    if (b & 1) ans = jzcf(ans, temp);
    temp = jzcf(temp, temp);
    b >>= 1;
  }
  return ans;
}
struct dy {
  int w, xh;
} sz[26];
bool cmp(dy x, dy y) {
  if (x.w == y.w) return x.xh < y.xh;
  return x.w > y.w;
}
long long f(long long a) {
  if (a <= 0) return 0;
  if (a % 4 == 3)
    return 0;
  else {
    long long ans = 0;
    for (int i = 0; i < a % 4 + 1; i++) ans ^= a - i;
    return ans;
  }
}
void init() {
  char s[3][20] = {"abcdefghi", "jklmnopqr", "stuvwxyz "};
  int a[26][26];
  int cz[8][2] = {{1, 0}, {-1, 0}, {0, 1},  {0, -1},
                  {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
  for (int i = 0; i < 3; i++) {
    int xb;
    if (i != 2) {
      xb = 9;
    } else {
      xb = 8;
    }
    for (int j = 0; j < xb; j++) {
      for (int k = 0; k < 8; k++) {
        int x = i + cz[k][0];
        int y = j + cz[k][1];
        if (x >= 0 && x < 3 && y >= 0 && y < 9 && s[x][y] >= 'a' &&
            s[x][y] <= 'z') {
          a[s[i][j] - 'a'][s[x][y] - 'a'] = 1;
        }
      }
    }
  }
}
int da = 0;
void bfs(string s, int cnt) {
  da = max(da, cnt);
  for (int i = 0; i < s.size(); i++) {
    if (i - 1 >= 0 && s[i] - s[i - 1] == 1) {
      bfs(string(s, 0, i) + string(s, i + 1, s.size() - i - 1), cnt + 1);
    } else if (i + 1 < s.size() && s[i + 1] == s[i] - 1) {
      bfs(string(s, 0, i) + string(s, i + 1, s.size() - i - 1), cnt + 1);
    }
  }
}
int nxt[maxnn];
int head[maxnn];
int to[maxnn];
int cnt = 1;
int n, m, k;
void add(int x, int y) {
  to[cnt] = y;
  nxt[cnt] = head[x];
  head[x] = cnt++;
}
int a[maxnn];
int vis[maxnn];
int w[maxnn];
vector<int> szz[maxnn];
void bfs(int t) {
  w[t] = 0;
  vis[t] = 1;
  priority_queue<pair<int, int>> que;
  que.push(make_pair(0, t));
  while (!que.empty()) {
    int p = que.top().second;
    int q = que.top().first;
    que.pop();
    for (int i = head[p]; i; i = nxt[i]) {
      if (!vis[to[i]]) {
        vis[to[i]] = 1;
        w[to[i]] = w[p] + 1;
        que.push(make_pair(-w[to[i]], to[i]));
      }
      if (w[to[i]] == w[p] + 1) {
        szz[to[i]].push_back(p);
      }
    }
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    add(y, x);
  }
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &a[i]);
  }
  bfs(a[k]);
  int mi = 0;
  int mx = 0;
  for (int i = 1; i < k; i++) {
    int flag = 0;
    for (int j = 0; j < szz[a[i]].size(); j++) {
      if (szz[a[i]][j] == a[i + 1]) {
        flag = 1;
      }
    }
    if (flag == 1 && szz[a[i]].size() > 1) {
      mx++;
    } else if (flag == 0) {
      mi++;
      mx++;
    }
  }
  printf("%d %d\n", mi, mx);
  return 0;
}
