#include <bits/stdc++.h>
using namespace std;
using LL = long long int;
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.st << "," << P.nd << ")";
}
const int MAXN = 1e6 + 6;
vector<int> G[MAXN];
int n, m;
int distFromV[MAXN];
int distFromU[MAXN];
bool vis[MAXN];
vector<int> path;
vector<int> g[MAXN];
void bfs(int start, int *dist, const vector<int> G[]) {
  queue<int> q;
  q.push(start);
  for (int i = 1; i <= n; ++i) {
    vis[i] = false;
  }
  vis[start] = true;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (auto v : g[u]) {
      if (vis[v] == false) {
        vis[v] = true;
        dist[v] = dist[u] + 1;
        q.push(v);
      }
    }
  }
}
int diff[MAXN];
int k[MAXN];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    int a, b;
    cin >> a >> b;
    G[a].push_back(b);
    g[b].push_back(a);
  }
  int xx;
  cin >> xx;
  for (int i = 1; i <= xx; ++i) {
    int x;
    cin >> x;
    path.push_back(x);
  }
  bfs(path.back(), distFromV, g);
  vector<pair<int, int>> pomm;
  for (int i = 1; i <= n; ++i) {
    pomm.push_back({distFromV[i], i});
  }
  sort(pomm.begin(), pomm.end());
  diff[path.back()] = 1;
  for (auto [val, i] : pomm) {
    for (auto x : G[i]) {
      if (distFromV[x] + 1 == distFromV[i]) {
        diff[i] += diff[x];
        k[i]++;
      }
    }
  }
  int minn = 0;
  int rest = xx;
  int maks = 0;
  for (int i = 0; i < xx - 1; ++i) {
    int u = path[i];
    int v = path[i + 1];
    (u, v, distFromV[u], distFromV[v]);
    if (distFromV[u] != distFromV[v] + 1) {
      ("ADD MIN");
      minn++;
      maks++;
    } else {
      (diff[u], k[u]);
      if (k[u] > 1) {
        ++maks;
      }
    }
  }
  (distFromV[6]);
  cout << minn << " " << maks << endl;
}
