#include <bits/stdc++.h>
using namespace std;
using lint = long long;
const int maxn = 2 * 100000 + 10;
const int INF = 0x3f3f3f3f;
vector<int> E[maxn];
vector<int> Eb[maxn];
int dis[maxn];
bool vis[maxn];
auto spfa(int s, int e) -> void {
  std::fill(dis, dis + 1 + maxn, INF);
  std::fill(vis, vis + 1 + maxn, false);
  queue<int> q;
  q.push(s);
  vis[s] = true;
  dis[s] = 0;
  while (!q.empty()) {
    int now = q.front();
    q.pop();
    vis[now] = false;
    for (auto&& item : Eb[now]) {
      int v = item;
      if (dis[v] > dis[now] + 1) {
        dis[v] = dis[now] + 1;
        if (vis[v]) continue;
        if (!vis[v]) {
          vis[v] = true;
          q.push(v);
        }
      }
    }
  }
}
int road[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    E[a].push_back(b);
    Eb[b].push_back(a);
  }
  int k;
  cin >> k;
  for (int i = 1; i <= k; ++i) {
    cin >> road[i];
  }
  int s = road[1], t = road[k];
  spfa(t, s);
  int ans = 0, dt = 0;
  int minLen = INF;
  for (int i = 1; i < k; ++i) {
    int s = road[i];
    int t = road[i + 1];
    int cnt = 1;
    int ansRoad = INF;
    minLen = dis[s];
    for (auto to : E[s]) {
      if (dis[to] == ansRoad)
        ++cnt;
      else if (dis[to] < ansRoad) {
        cnt = 1;
        ansRoad = dis[to];
      }
    }
    if (minLen - 1 < dis[t])
      ++ans;
    else if (cnt != 1)
      ++dt;
  }
  cout << ans << " " << ans + dt << endl;
  return 0;
}
