#include <bits/stdc++.h>
using namespace std;
long long mod = 10000000000;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long fastexp(long long x, long long n) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result *= x;
    x *= x;
    n = n / 2;
  }
  return result;
}
long long modularExp(long long x, long long n, long long mod) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % mod;
    x = ((x % mod) * (x % mod)) % mod;
    n = n / 2;
  }
  return (result) % mod;
}
bool isPrime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
bool mycomp(pair<long long, long long> &a, pair<long long, long long> &b) {
  if (a.first != b.first)
    return a.first < b.first;
  else
    return a.second < b.second;
}
bool check(vector<long long> &v, long long n, long long x) {
  vector<long long> mp(n + 1);
  long long i;
  for (i = 1; i <= x; i++) mp[v[i]] = 1;
  for (i = 1; i <= x; i++)
    if (!mp[i]) return false;
  for (i = 1; i <= n; i++) mp[i] = 0;
  for (i = x + 1; i <= n; i++) mp[v[i]] = 1;
  for (i = x + 1; i <= n; i++)
    if (!mp[i]) return false;
  return true;
}
vector<long long> v[200005], tv[200005];
vector<long long> d(200005, -1), vis(200005, 0), cnt(200005, 0);
void bfs(long long x) {
  queue<long long> q;
  q.push(x);
  d[x] = 0;
  vis[x] = 1;
  while (!q.empty()) {
    x = q.front();
    q.pop();
    for (auto it : tv[x]) {
      if (d[it] == -1) {
        d[it] = 1 + d[x];
        vis[it] = 1;
        q.push(it);
      }
      if (d[it] == 1 + d[x]) cnt[it]++;
    }
  }
}
void solve() {
  long long n, m;
  cin >> n >> m;
  long long i;
  for (i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    v[x].push_back(y);
    tv[y].push_back(x);
  }
  long long k;
  cin >> k;
  vector<long long> path(k);
  for (i = 0; i < k; i++) cin >> path[i];
  bfs(path[k - 1]);
  long long mi = 0, ma = 0;
  for (i = 0; i < k - 1; i++) {
    long long curr = path[i];
    long long nxt = path[i + 1];
    if (d[nxt] > d[curr] - 1) {
      ma += 1;
      mi += 1;
    } else if (cnt[curr] >= 2)
      ma += 1;
  }
  cout << mi << " " << ma;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
