#include <bits/stdc++.h>
long long power(long long a, long long b, long long mod);
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f3f;
const int N = 2e5 + 5;
int n, m;
int a[N];
vector<int> e[N];
set<int> s[N];
int dis[N];
bool vis[N];
void INIT() {
  for (int i = 1; i <= n; i++) {
    e[i].clear();
  }
  for (int i = 1; i <= n; i++) {
    s[i].clear();
  }
  memset(dis, 0, sizeof(dis));
  memset(vis, 0, sizeof(vis));
}
void solve() {
  INIT();
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    e[v].push_back(u);
  }
  int k;
  cin >> k;
  for (int i = 1; i <= k; i++) {
    cin >> (a[i]);
  }
  queue<int> q;
  q.push(a[k]);
  vis[a[k]] = 1;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (auto v : e[x]) {
      if (vis[v] == 0) {
        vis[v] = 1;
        dis[v] = dis[x] + 1;
        s[v].insert(x);
        q.push(v);
      } else {
        assert(dis[v] <= dis[x] + 1);
        if (dis[v] == dis[x] + 1) {
          s[v].insert(x);
        }
      }
    }
  }
  int maxx = 0, minn = 0;
  for (int i = 1; i <= k - 1; i++) {
    assert(vis[a[i]]);
    if (s[a[i]].find(a[i + 1]) == s[a[i]].end()) {
      maxx++;
      minn++;
    } else {
      if (s[a[i]].size() > 1) maxx++;
    }
  }
  cout << minn << " " << maxx << endl;
}
int main() {
  ios::sync_with_stdio(false);
  while (cin >> n >> m) {
    solve();
  }
  return 0;
}
long long power(long long a, long long b, long long mod) {
  long long ans = 1;
  while (b) {
    if (b % 2) ans = ans * a % mod;
    a = a * a % mod;
    b = b / 2;
  }
  return ans;
}
